[Bug]: throwing a response with headers should preserve the headers

What version of React Router are you using?
6.4+
Steps to Reproduce
I put an example with Remix together for this, but I think the fix will be in the router which is why I'm opening this issue here (maybe the repos should be merged afterall?).
Here's the repo: https://github.com/kentcdodds/throw-response-headers
Here's a loom explaining the issue: https://www.loom.com/share/20a07a160bd54ec6bf228dcdc46f1ef3
Expected Behavior
The short of it is, if you stick this in a loader:
export async function loader() {
  throw new Response("", { status: 418, headers: { "x-my-header": "sup" } });
}

The x-my-header doesn't show up in the response.
But if you do this:
import { redirect } from "@remix-run/node";

export async function loader() {
  throw redirect("/", { headers: { "x-my-header": "sup" } });
}

The x-my-header does show up.
Actual Behavior
I would expect throwing a response to preserve the headers of that response (like it does with a redirect).

FWIW the reason it works with redirect is because we just send the redirect Response back verbatim, and we don't have to deal with merging headers from multiple Response instances

Thank you for letting me know of that workaround!
I tried a few variations and determined that if you want the headers to come through in this case you need:

A CatchBoundary at the route that throws the response (or, if you're using v2_errorBoundary, then it's an ErrorBoundary you need)
A headers export that forwards the custom headers along for the document headers

I think the current behavior makes sense, but I'm not certain. It kinda feels like we're getting half of a feature. Part of the throw new Response feature is that those responses bubble up to the nearest parent with a Boundary. But the headers don't bubble like the response does. So the UI bubbles, but headers don't. Even if the route that throws is a child and it has a headers export, that's ignored if the child doesn't have a Boundary export.
So we get response UI error bubbling, but not response header bubbling. I think I would be satisfied with the current behavior if the headers export also got a childLoaderHeaders option that it could use to combine headers (along with the loaderHeaders, actionHeaders, and parentHeaders). But that kinda feels wrong.
Instead, I think it would be better if the headers function that's called is always the one for the route that's matched, even if that route's loader fails. But that also feels kinda wrong because maybe we're not throwing a Response, maybe it's a runtime type error or something. So maybe the loaderHeaders could be an empty Headers in that case? (I think that's what it is if the page is rendered by an action instead).
All that said, I really don't think it should be necessary to put a headers export in every one of your routes. Especially for use cases like this where you could have an abstraction like requireUserWithPermissions which throws a 403 response and you want one parent to handle the UI and headers for that. Otherwise, any route that uses requireUserWithPermissions has to not only call it in their loader, but also must handle the response headers which could be easy to do 😬
Now, that use case may be handled by the upcoming context feature. Is it?
Anyway, I'm not certain what to recommend here, but the status quo feels wrong to me.

All that said, I really don't think it should be necessary to put a headers export in every one of your routes

I agree here.  I'd love to re-think the approach there and see if we could be smarter based on which matched routes actually exported a headers method and/or returned/threw a Response with headers.  In the simplest case if only one loader specified headers, and no routes exported function headers(), then you could just use them and be done with it.  Not sure if those heuristics hold up in more complex setups though...

Now, that use case may be handled by the upcoming context feature. Is it?

I think so?  If you have a middleware on the parent with headers+boundary, then requireUserWithPermissions throwing there would technically throw from each loader (including parent) and thus the parent headers would get access to it form it's own thrown response, since it is the boundary route?
middleware will definitely change the discussion here a bit so it's worth letting that land before making any decisions on this specific behavior 👍

This is definitely still relevant.

Fixed by #6425 and should be available in 1.17.0.  You'll have errorHeaders available in your leaf headers function.
Also worth noting we are going to get #5473 merged as well.  That was never the intended behavior (and pre v1 it didn't work that way) but since it got changed (presumably unintentionally) pre-v1 we're going to stick it behind a future flag.  So then we'll use the deepest renderable headers function if the leaf doesn't provide one.


Include custom data in negotiation query string

Previously the query-string wasn't used for the negotiation call.
This is necessary for authorization via query-string.

I'm sorry, I have to close this PR


How to show the semantic information of the object

Thanks for your great work.As we see in the paper , you use different color to represent the semantic information of the object.How to set the color?Or can we export the object category in the terminal？Looking forward to your reply.

Thanks for your great work.As we see in the paper , you use different color to represent the semantic information of the object.How to set the color?Or can we export the object category in the terminal？Looking forward to your reply.

the object label 、box vertex coordinates and confidence are saves in 000000_pred_map_cls.txt file, you can see details in models/dump_helper.py
also you can print them is the terminate by modifying models/dump_helper.py file


Gitter -> Discord

What problem does this feature solve?
All vue community is on discord. There even nuxtjs room on vue discord server.
Nuxt have a link to gitter on main page. So it create two separate chats for same thing and divide users, i often see question repeated in both discord and gitter.
Maybe just change gitter to room in official vue discord server?

This feature request is available on Nuxt community (#c7434)

i agree!

My only complaint about Discord is the lack of threaded conversations (same problem with Gitter too).

On behalf of https://chat.vuejs.org moderators team, I offer all the help that may be required during in the transition.

Thanks @aldarund


Propagate return types of derived methods to their bases

This change fixes #4715
Rationale:
If class A(B), and both have method foo, then any variable v of type B can potentially hold value of type A. Which means, that v.foo() can return a value of type that of return value of A.foo or B.foo.
To achieve that, when function return type is determined by DDG, it is also added as a potential return type for all of the function's bases (e.g. functions, that this function overrides).
In addition to that, this change also improves DDG.LookupBaseMethods, which previously only took into account built-in classes.

A note: with this change, AnalysisTest.SubclassFindAllRefs starts failing:

Assert.Fail failed. References did not match.
Actual:
new VariableLocation(4, 14, VariableType.Reference),
new VariableLocation(6, 5, VariableType.Value),
new VariableLocation(6, 9, VariableType.Definition),
new VariableLocation(11, 5, VariableType.Reference),
new VariableLocation(11, 9, VariableType.Definition)
Expected but missing:
new VariableLocation(11, 5, VariableType.Value)
Unexpected:
new VariableLocation(11, 5, VariableType.Reference)

The tested code for the reference:
class Base(object):
    def __init__(self):
        self.fob()

    def fob(self):
        pass

class Derived(Base):
    def fob(self):
        'x'

I've analyzed the failure.
This change causes a new VariableLocation to be introduced by the analysis, of type VariableType.Reference (see test output). The expected VariableType.Value is also present in the analysis, however test function PythonAnalysis.UniquifyReferences prefers VariableType.Reference to VariableType.Value, which results in masking the later.
I do not understand the expected behavior here, so, please, advise if the test code should be fixed, or my change is producing unexpected result.

Thank you for the PR!
@AlexanderSher has ported your changes in https://github.com/Microsoft/python-language-server/pull/115
We're still in the process of moving over to using it from PTVS, which is why it is still in the PTVS code base at the moment. We'll be consuming it as a nuget package.
We'll continue discussion of merging your changes in the above PR.

These changes have now been merged at https://github.com/Microsoft/python-language-server/pull/115
Thanks!


Create a new readme file inside every directory

So that user will not have open each a every file to look into it. this is just a sample if maintainer feels good we can apply this to all the directories.

@abhay222 thanks Abhay for sharing useful resources. Appreciate your contribution and looking forward for more!


Add a list of available languages to the docs

Closed by https://github.com/xhlulu/dl-translate/pull/30


time OR does not work

Query
SELECT _count FROM table where time =<PHONE_NUMBER>000000000 or time =<PHONE_NUMBER>000000000 or time =<PHONE_NUMBER>000000000;
Return empty result
Log
[query] 2016/07/27 00:21:41 SELECT _count FROM table WHERE time =<PHONE_NUMBER>000000000 OR time =<PHONE_NUMBER>000000000 OR time =<PHONE_NUMBER>000000000
[httpd] 2016/07/27 00:21:41 <IP_ADDRESS> - - [27/Jul/2016:00:21:41 +0300] POST /query?chunked=true&db=rusiem&epoch=ns&q=SELECT+_count+FROM+table+where+time+%3D+1469404800000000000+or+time+%3D+1468800000000000000+or+time+%3D+1468195200000000000%3B HTTP/1.1 200 46 - InfluxDBShell/0.13.0 f2208ead-5376-11e6-9967-000000000000 916.175µs
Query
SELECT _count FROM table where time =<PHONE_NUMBER>000000000;
Return result
1469404800000000000	4
1469404800000000000	3
1469404800000000000	1
Help please!!
Version influxdb_0.13.0_amd64.deb

Duplicate of #3290.


Enable us to pipe service(/cluster?) logs to ELK Stack for example

Currently kontana stores the logs on the master, which is better than having them on the nodes, but searchability is limited and we can't for example build reports and dashboards around that using common tools like Kibana.
As you mentioned in Gutter it's possible to scrape the logs from the mongo DB on the master, but this has to be done outside of the cluster which is not ideal, because we have to maintain dedicated hosts to handle the logs and can't use docker resp. kontena to host elasticsearch, kibana etc.
It would be great if additionally(?) we could activate something like filebeat/logspout/logstash or something like that, that also pipes the data into elasticsearch so we can better search and monitor the logfiles. Especially when you have things like zipkin etc. to follow request through your system, you need some aggregated view on the logs.
I think it would be sufficient for kontena to provide a service that gathers the logs and is able to pipe them into logstash server or elasticsearch directly. This would help a lot!
https://hub.docker.com/r/sebp/elk/ is a nice combined docker image that I used with docker swarm.

This is actually something we've been discussing few times already. :) The main idea has been to enable agent(s) to ship the logs also to some other endpoint in addition to Kontena master. Currently we're thinking of supporting fluentd as the "protocol". The configuration would be pretty much the same as one does for enabling direct statistics exporting, so soomething like:
$ kontena grid update --fluentd-log-server foo.bar.com:12345 my-grid

This would activate the log shiping on all agents within the grid.
Tentatively scheduled for 1.2 release.

Sounds good and the log server could also be running as service in this cluster?
What is the (rough) timeframe for the 1.2 release?

Yes, this way the ELK stack (or whatever is capable to receive fluentd) can be run within the same grid. But it also allows it to be running anywhere, separate grid, external logging service or where-ever. :)
We're still working on some of the items for 1.1 release so I'd say 1.2 is should be out in the end of February timeframe.

An obvious protocl IMHO would be syslog.


Retain Fastg output from Spades

Spades generates a FASTG format file as well as FASTA for contigs. Some users would appreciate having the FASTG contigs available to them.

Yeah. Thank you Sam. Really I could realize this by adding the parameter keep_assemblies=True. If anyone could keep only the Fastg file, it would be better. Thanks.
XJ


wiring schematic diagram

Please provide a wiring schematic diagram, in order to avoid mistakes.

It's simple, search pinout for PS2 Mouse and SNES port to connect both to the Arduino


Nothing working with latest server

I added the vrp folder with all included files/folder to the resources folder, and referenced it in the server config, but there's absolutely nothing displaying when logged into the server. Pressing M does nothing, and there aren't any blips on the radar. Perhaps I'm confused as to how this all works? My steam ID is set to admin in the server configuration. I'm using the latest FX-server #290-04e034829f75169f11ee33abf67281ecd74728e3
Thanks for helping out. This is an amazing looking framework, and I appreciate any effort you can put into a first-timer FiveM admin.

Error loading script base.lua in resource vrp: base.lua:2: attempt to call a nil value (global 'require')
stack traceback:
base.lua:2: in main chunk
Failed to load script base.lua.

Error loading script modules/group.lua in resource vrp: modules/group.lua:9: attempt to call a nil value (global 'require')
stack traceback:
modules/group.lua:9: in main chunk
Failed to load script modules/group.lua.

Error loading script modules/admin.lua in resource vrp: modules/admin.lua:1: attempt to call a nil value (global 'require')
stack traceback:
modules/admin.lua:1: in main chunk
Failed to load script modules/admin.lua.

Error loading script modules/gui.lua in resource vrp: modules/gui.lua:1: attempt to call a nil value (global 'require')
stack traceback:
modules/gui.lua:1: in main chunk
Failed to load script modules/gui.lua.

Error loading script modules/survival.lua in resource vrp: modules/survival.lua:1: attempt to call a nil value (global 'require')
stack traceback:
modules/survival.lua:1: in main chunk
Failed to load script modules/survival.lua.

Error loading script modules/player_state.lua in resource vrp: modules/player_state.lua:1: attempt to call a nil value (global 'require')
stack traceback:
modules/player_state.lua:1: in main chunk
Failed to load script modules/player_state.lua.

Error loading script modules/map.lua in resource vrp: modules/map.lua:10: attempt to index a nil value (global 'vRP')
stack traceback:
modules/map.lua:10: in main chunk
Failed to load script modules/map.lua.

Error loading script modules/money.lua in resource vrp: modules/money.lua:1: attempt to index a nil value (global 'vRP')
stack traceback:
modules/money.lua:1: in main chunk
Failed to load script modules/money.lua.

Error loading script modules/inventory.lua in resource vrp: modules/inventory.lua:1: attempt to index a nil value (global 'vRP')
stack traceback:
modules/inventory.lua:1: in main chunk
Failed to load script modules/inventory.lua.

Error loading script modules/identity.lua in resource vrp: modules/identity.lua:1: attempt to call a nil value (global 'require')
stack traceback:
modules/identity.lua:1: in main chunk
Failed to load script modules/identity.lua.

Error loading script modules/business.lua in resource vrp: modules/business.lua:4: attempt to call a nil value (global 'require')
stack traceback:
modules/business.lua:4: in main chunk
Failed to load script modules/business.lua.

Error loading script modules/item_transformer.lua in resource vrp: modules/item_transformer.lua:7: attempt to call a nil value (global 'require')
stack traceback:
modules/item_transformer.lua:7: in main chunk
Failed to load script modules/item_transformer.lua.

Error loading script modules/emotes.lua in resource vrp: modules/emotes.lua:4: attempt to call a nil value (global 'require')
stack traceback:
modules/emotes.lua:4: in main chunk
Failed to load script modules/emotes.lua.

Error loading script modules/police.lua in resource vrp: modules/police.lua:3: attempt to index a nil value (global 'vRP')
stack traceback:
modules/police.lua:3: in main chunk
Failed to load script modules/police.lua.

Error loading script modules/home.lua in resource vrp: modules/home.lua:4: attempt to index a nil value (global 'vRP')
stack traceback:
modules/home.lua:4: in main chunk
Failed to load script modules/home.lua.

Error loading script modules/home_components.lua in resource vrp: modules/home_components.lua:3: attempt to index a nil value (global 'vRP')
stack traceback:
modules/home_components.lua:3: in main chunk
Failed to load script modules/home_components.lua.

Error loading script modules/mission.lua in resource vrp: modules/mission.lua:3: attempt to index a nil value (global 'vRP')
stack traceback:
modules/mission.lua:3: in main chunk
Failed to load script modules/mission.lua.

Error parsing script modules/atm_finder.lua in resource vrp: modules/atm_finder.lua:9: ')' expected near 'function'
Failed to load script modules/atm_finder.lua.

Error loading script modules/debug.lua in resource vrp: modules/debug.lua:2: attempt to index a nil value (global 'vRP')
stack traceback:
modules/debug.lua:2: in main chunk
Failed to load script modules/debug.lua.

Error loading script modules/aptitude.lua in resource vrp: modules/aptitude.lua:4: attempt to call a nil value (global 'require')
stack traceback:
modules/aptitude.lua:4: in main chunk
Failed to load script modules/aptitude.lua.

Error loading script modules/basic_phone.lua in resource vrp: modules/basic_phone.lua:4: attempt to index a nil value (global 'vRP')
stack traceback:
modules/basic_phone.lua:4: in main chunk
Failed to load script modules/basic_phone.lua.

Error loading script modules/basic_atm.lua in resource vrp: modules/basic_atm.lua:4: attempt to index a nil value (global 'vRP')
stack traceback:
modules/basic_atm.lua:4: in main chunk
Failed to load script modules/basic_atm.lua.

Error loading script modules/basic_market.lua in resource vrp: modules/basic_market.lua:3: attempt to index a nil value (global 'vRP')
stack traceback:
modules/basic_market.lua:3: in main chunk
Failed to load script modules/basic_market.lua.

Error loading script modules/basic_gunshop.lua in resource vrp: modules/basic_gunshop.lua:3: attempt to call a nil value (global 'require')
stack traceback:
modules/basic_gunshop.lua:3: in main chunk
Failed to load script modules/basic_gunshop.lua.

Error loading script modules/basic_garage.lua in resource vrp: modules/basic_garage.lua:4: attempt to index a nil value (global 'vRP')
stack traceback:
modules/basic_garage.lua:4: in main chunk
Failed to load script modules/basic_garage.lua.

Error loading script modules/basic_items.lua in resource vrp: modules/basic_items.lua:2: attempt to call a nil value (global 'require')
stack traceback:
modules/basic_items.lua:2: in main chunk
Failed to load script modules/basic_items.lua.

Error loading script modules/basic_skinshop.lua in resource vrp: modules/basic_skinshop.lua:3: attempt to call a nil value (global 'require')
stack traceback:
modules/basic_skinshop.lua:3: in main chunk
Failed to load script modules/basic_skinshop.lua.

Error loading script modules/cloakroom.lua in resource vrp: modules/cloakroom.lua:3: attempt to index a nil value (global 'vRP')
stack traceback:
modules/cloakroom.lua:3: in main chunk
Failed to load script modules/cloakroom.lua.

Error loading script modules/survival_reverse.lua in resource vrp: modules/survival_reverse.lua:1: attempt to call a nil value (global 'require')
stack traceback:
modules/survival_reverse.lua:1: in main chunk
Failed to load script modules/survival_reverse.lua.

Started resource vrp

Yes, vRP++ is out of date as of the moment. I’m working on porting it to FXServer, slowly because of life matters.

I understand completely. Thanks for the reply!


[index] Use the index symbol types and APIs from the clang header.

This avoids duplication and centralizes handling of symbols.

@swift-ci smoke test


TestServer HttpContext.Abort does nothing

Hosting a website with TestHost and calling HttpContext.Abort() inside a request does not set HttpContext.RequestAborted.

Does this ever work (even outside TestHost) ? I'm trying to see what needs to be done here, but all I find is that HttpContext.Abort() calls LifetimeFeature.Abort(); which is an empty method.

Never mind, it's supposed to be empty as the purpose is to let users implement their own feature implementing IHttpRequestLifetimeFeature. 😎

Yes it works outside of test host. Nothing uses that default feature implementation, servers implement their own.

Accepted via tests, no out of band SDK testing required.


Remove version: LBRY.LBRY version 0.52.6

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

Close with reason: Duplicate;


New version: Mega.MEGASync version <IP_ADDRESS>

Description

Also remove version <IP_ADDRESS>
Related #124954

Checks

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?
Have you tested your manifest locally with winget install --manifest <path>?

[ ] x64, user scope
[x] x64, machine scope
[ ] x86, user scope
[ ] x86, machine scope

[x] Does your manifest conform to the 1.5 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@stephengillie It seem why you add Need-Attention label.

@stephengillie It seem why you add Need-Attention label?

This PR seems to have passed validation despite receiving a SmartScreen error.

This pull request is blocked because the installer wizard cannot pass Windows Defender SmartScreen detection.
Close without merge. Hope this may be a false positive and others will continue work on it again.


False positive on iam_policy_allows_privilege_escalation for iam:CreateAccessKey restricted to current user

Steps to Reproduce

Create AWS IAM policy:

{
    "Statement": [
        {
            "Action": [
                "iam:UpdateAccessKey",
                "iam:ListAccessKeys",
                "iam:DeleteAccessKey",
                "iam:CreateAccessKey"
            ],
            "Effect": "Allow",
            "Resource": [
                "arn:aws:iam::123456789012:user/*/${aws:username}",
                "arn:aws:iam::123456789012:user/${aws:username}"
            ],
            "Sid": "AllowManageOwnAccessKeys"
        }
    ],
    "Version": "2012-10-17"
}

Run prowler aws --check iam_policy_allows_privilege_escalation

Expected behavior
Check for policy above should pass considering that target resources are restricted only to current user.
Actual Result with Screenshots or Logs
Check will fail with:
Custom Policy arn:aws:iam::123456789012:policy/IAMSelfManagement-xxxxxx allows privilege escalation using the following actions: 'iam:CreateAccessKey'.

How did you install Prowler?
Cloning the repository from github.com (git clone)
Environment Resource
Workstation
OS used
MacOS
Prowler version
4.6.0
Pip version
24.2
Context
I'm using https://registry.terraform.io/modules/terraform-aws-modules/iam/aws/latest/submodules/iam-group-with-policies?tab=inputs to provision user groups with self management policy (part of which is in example above)
https://github.com/terraform-aws-modules/terraform-aws-iam/blob/e20e0b9a42084bbc885fd5abb18b8744810bd567/modules/iam-group-with-policies/policies.tf#L48

Hello @enver, we will review this as soon as we can and we'll get back to you.
Thanks!

Looks like your IAM policy is incorrect. The correct resource is arn:aws:iam:::user/${aws:username}
This resource "arn:aws:iam::123456789012:user//${aws:username}" needs to be removed from your policy
{
            "Sid": "AllowManageOwnAccessKeys",
            "Effect": "Allow",
            "Action": [
                "iam:CreateAccessKey",
                "iam:DeleteAccessKey",
                "iam:ListAccessKeys",
                "iam:UpdateAccessKey",
                "iam:GetAccessKeyLastUsed"
            ],
            **"Resource": "arn:aws:iam::*:user/${aws:username}"**
}

Just tested against latest codebase in master and I cant reproduce the issue

I can confirm it is still reproducible with latest master version (53a4befb0172bbb806cb39f05179af77a705fc7f)

Very Strange, heres my output highlighting the resource in the policy on the last line. 100% Pass no Failed

Nope your right. It does indeed fail @enver

Hi @enver,
Thank you for reporting this. The iam_policy_allows_privilege_escalation check evaluates IAM policies broadly and does not currently differentiate between resource restrictions like ${aws:username}. This approach ensures comprehensive privilege escalation detection but may flag certain policies as risky even if their scope appears secure.
For your use case, since the policy is restricted to the current user and appears safe, you can add it to the Prowler mutelist. This will exclude the policy from this specific check. Here’s an example mutelist entry:
Mutelist:
  Accounts:
    "*":
      Checks:
        "iam_policy_allows_privilege_escalation":
          Regions:
            - "*"
          Resources:
            - "IAMSelfManagement-xxxxxx"

Please review the policy carefully before mutelisting to ensure it meets your security requirements. Let us know if you have further questions!


define process for adding blog posts

It's exciting to see the work people are doing in this space! In an initial discussion on Cloud Native Slack #smi, we talked about the goal of the blog: to share work happening in the SMI space.
We thought about rules for blog posts:

be useful and informative for readers, who won't need to buy specific commercial offerings in order to learn something
does not need to exclusively cover open source software, but also should not be primarily product pitches
should disclose and link to the employer of the person writing the blog post

Some questions to consider:

do we want blog posts to have the usual number of spec reviewers (two)?
do we want to specify these reviewers should be from different employers?

Pinging @grampelberg @stefanprodan @lachie83 as folks who may have opinions on how we onboard blog posts.

RE: questions
Who / how many folks are in the defined spec reviewers group?
At least different from the submitter :)

Spec reviewers: https://github.com/servicemeshinterface/smi-spec/blob/master/CODEOWNERS

Q: Are cross-over posts welcome from other (CNCF) projects?
For example, we are building an SMI scaler for KEDA, once that's finished are you open for a post showing how both work together?
No concrete plans yet but just checking.


Allow multiple IPs to be added on creating an allowlist

Is your feature request related to a problem? Please describe.
Only allowed to create one cidr on creating an allowlist.
Describe the solution you'd like
Allow multiple IPs to be added on creating an allowlist
Additional context
When using the UI, multiple IPs can be added. This would be nice to have from the cli for automation
The error message below seems like it can take a list but I was not sure of the format. I tried using [] () with and without commas between the ips.
The docs indicate  one cidr block -c, --cidr=cidr
In the UI you can add multiple.
error message:
createIPAllowlist.representation.ipCidrSet[].
›   ([<IP_ADDRESS>/24,<IP_ADDRESS>/24]) IP CIDR block is not valid
›   Code: ERROR_CREATE_IP_ALLOWLIST

this works if you use multiple --cidr=cidr per ip


Update Version

Update the number on the app to 1.8

translationCore Create - v1.8 build 183-ca725ce in Develop.


Fix ids in the crawler source table.

https://github.com/internetofwater/nldi-db/blob/master/liquibase/changeLogs/nldi/nldi_data/update_crawler_source/crawler_source.tsv should have sequential and non-gapped ids.

Functioning crawler source table (for current artifacts): https://github.com/internetofwater/nldi-db/blob/master/database/demo/crawler_source.tsv

Cool. Can you take on this issue quick?


Metrics

Let's see if it builds. More cleanup after.

Build failed https://gradle.com/s/llbuhwkxhvldu

Build failed https://gradle.com/s/5vinspp66phi4

Build failed https://gradle.com/s/dzfvnnx5tzp22

Build failed https://gradle.com/s/fvew56ktti37w

Build failed https://gradle.com/s/kmquglg5gauzw

Build failed https://gradle.com/s/4ncakgfmimusc

Build failed https://gradle.com/s/v4dozu3utnwg4


Cassandra Module Wait Strategy doesn't work with Authentication Enabled

Code
CassandraContainer CASSANDRA_CONTAINER = new CassandraContainer<>("cassandra:3.11.4")
            .withConfigurationOverride("cassandra-config")
            .waitingFor(new CassandraQueryWaitStrategy());

cassandra-config folder contains cassandra.yml. This was copy pasted from example with one line changed.
authenticator: AllowAllAuthenticator

was changed to
authenticator: PasswordAuthenticator

I get an exception
Exception in thread "main" org.testcontainers.containers.ContainerLaunchException: Container startup failed
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:322)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:302)
	at com.walmart.services.offer.listing.BaseOfferStoreIT.main(BaseOfferStoreIT.java:70)
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:315)
	... 2 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:485)
	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:317)
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
	... 3 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for Cassandra to be accessible for query execution
	at org.testcontainers.containers.wait.CassandraQueryWaitStrategy.waitUntilReady(CassandraQueryWaitStrategy.java:36)
	at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:35)
	at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:876)
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:428)
	... 5 more

The Simplest explanation seems to be the getCluster method in CassandraContainer
public static Cluster getCluster(ContainerState containerState, boolean enableJmxReporting) {
        final Cluster.Builder builder = Cluster.builder()
            .addContactPoint(containerState.getContainerIpAddress())
            .withPort(containerState.getMappedPort(CQL_PORT));
        if (!enableJmxReporting) {
            builder.withoutJMXReporting();
        }
        return builder.build();
    }

OS - Mac
testcontainer version - 1.12.5
docker version - <IP_ADDRESS> (38240)

I think there is a similar issue for the init script functionality. It does not seem possible to supply username/password authentication.

@mkjensen - you are correct. I have fixed that issue as well with the PR that I have created, but nobody seems to have reviewed it for 10 days.

@KraTos5589 we are 100% community driven project and although we would like to review every PR we receive ASAP, sometimes we simply don't have enough capacity for that, please keep it in mind. I hope you will understand.

@bsideup I understand,

@bsideup @rnorth Can you guys please review the PR associated with this


iOS implementation of ShouldInterceptRequest

• Flutter version 1.26.0-17.3.pre at G:\BackUp\flutter
• Framework revision 4b50ca7f7f (5 days ago), 2021-02-04 19:44:27 -0800
• Engine revision 2c527d6c7e
• Dart version 2.12.0 (build 2.12.0-259.8.beta)

Task
Implement caching mechanism for WebView, and replace images from web page,
with already cached and saved to local,
Description
Need some analog to existing mechanism androidShouldInterceptRequest for iOS,
according to "https://pub.dev/packages/iwebview_flutter" it's technically possible.
Possibly something similar already exists in flutter_inappwebview?

Unfortunately no, iwebview_flutter is using iOS Private API such as wk_registerScheme.
I have already tried it, but Apple won't accept your App because of this (for example see this post Question on using private API in WKWebView).
The only official iOS API that allows something similar is WKURLSchemeHandler, which, in my plugin, has been mapped as the onLoadResourceCustomScheme event.
To intercept requests that have custom schemes (so, http and https can't be registered unfortunately!), you need to register the custom schemes you want to listen using the InAppWebViewOptions.resourceCustomSchemes option.

Thanks for clarification!


Style changes are not hot reloading

Trying out the 2.x beta using the same example styled-jsx code in the readme. Changing background: red to background: green results in all elements losing their styles. Refreshing restores them and displays the changes.
Edit: impronunciable mentioned below that styles are not being flushed. I'm noticing that as well. At first I thought it was related to using global, but it's not.

A bigger issue that I spotted from here is that styles are not being flushed. If I change the background some times and then refresh I still get 4 style tags with previous styles even if those are not used anymore

Same here (with some more issue) https://github.com/zeit/styled-jsx/issues/50

@rauchg npm is still listing 0.2.2 as the latest for styled-jsx

0.2.3 has been published


Make .Reply() and friends split the message when it's too long

In the past I have found that a sane limit is 450 characters.

I've gone back and forth on this, trying to decide if this should be done or not. My current opinion is to add another method which would handle splitting, but that may start to get fairly complicated due to having so many .Reply methods.
func (c *Client) Reply(e *Event, format string, v ...interface{}) error
func (c *Client) MentionReply(e *Event, format string, v ...interface{}) error

// These would be added (or something like these
func (c *Client) SplitReply(e *Event, format string, v ...interface{}) error
func (c *Client) SplitMentionReply(e *Event, format string, v ...interface{}) error

Opinions? Ways it could be done better?

Maybe some kind of configuration setting to automatically split?

I think the ideal solution to this would to implement this as an output handler as soon as #2 is solved

Because #2 was closed, I think this would be better handled elsewhere so this package can stay as simple as possible.


Support HTTPS config

I'm a big fan of sql_exporter, using it extensively! So first of all, thank you for this nice piece of software. 🙂
One thing I'd really like to see is being able to run sql_exporter with HTTPS, maybe similar how the node_exporter handles it. Are you planning on adding such a feature? If not, would you be interested to accept a pull request?

FWIW, some drivers can handle it via connection parameters, e.g., https://github.com/go-sql-driver/mysql


Python version in walkthrough

indicate Python version

Works fine.
the only idea would be: It would be consistent to put a sentence like https://github.com/ome/ome-documentation/pull/2046/commits/a102383db542c1e22847e22b34deb9a6075a18de#diff-85beefdd7d187cd948ad5cfb585996edR12 also into the Python 3.6 walkthroughs for CentOS7 and Ubuntu16.04 (Python 3.6)

@pwalczysko done


Port the JavaScript to Swift

What's up with all the JavaScript?

The JavaScript became to difficult to maintain, so as of today it is now all TypeScript. A step in the right direction.


Running into RemoteDisconnected error when running explainaboard with multiple metrics/some metrics.

Hello, I ran into RemoteDisconnected error when I was running multiple metrics at once to generate reports. So, I tried running them individually, and found that some metrics worked and ran into the same issues for some other metrics.
Example traceback of the errors:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/Users/iglee/opt/anaconda3/lib/python3.9/http/client.py", line 1377, in getresponse
    response.begin()
  File "/Users/iglee/opt/anaconda3/lib/python3.9/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/Users/iglee/opt/anaconda3/lib/python3.9/http/client.py", line 289, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
    resp = conn.urlopen(
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/Users/iglee/opt/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/Users/iglee/opt/anaconda3/lib/python3.9/http/client.py", line 1377, in getresponse
    response.begin()
  File "/Users/iglee/opt/anaconda3/lib/python3.9/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/Users/iglee/opt/anaconda3/lib/python3.9/http/client.py", line 289, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Failed command I tried: (multiple metrics, bart_score_mt, comet)
explainaboard --task machine-translation --custom_dataset_paths data/wmt21/formatted/data/challengeset.de-en.system1.data --system_outputs data/wmt21/formatted/sysout/challengeset.de-en.system1.sysout --metrics comet
explainaboard --task machine-translation --system_outputs data/wmt21/formatted/challengeset.de-en.system2.tsv --metrics chrf bleu comet
Worked: (chrf, mover_score, rouge2)
explainaboard --task machine-translation --custom_dataset_paths data/wmt21/formatted/data/florestest2021.bn-hi.GTCOM.data --system_outputs data/wmt21/formatted/sysout/florestest2021.bn-hi.GTCOM.sysout --metrics chrf

oh, actually, bart_score_mt was a different error. just checked the log again, and it was ValueError: Invalid metric specification.


bioepic: OverflowError: cannot convert float infinity to integer

I have installed bioepic and have run the epic program from the bin folder. However, each time I run my H3K27me3 ChIP against Input I get the following error:
Merging the bins on both strands per chromosome. (File: count_reads_in_windows, Log level: INFO, Time: Thu, 03 Nov 2016 21:53:12 )
Merging ChIP and Input data. (File: helper_functions, Log level: INFO, Time: Thu, 03 Nov 2016 21:57:15 )
600000000.0 effective_genome_size (File: compute_background_probabilites, Log level: DEBUG, Time: Thu, 03 Nov 2016 21:58:51 )
200 window size (File: compute_background_probabilites, Log level: DEBUG, Time: Thu, 03 Nov 2016 21:58:51 )
0 total chip count (File: compute_background_probabilites, Log level: DEBUG, Time: Thu, 03 Nov 2016 21:58:51 )
0.0 average_window_readcount (File: compute_background_probabilites, Log level: DEBUG, Time: Thu, 03 Nov 2016 21:58:51 )
1 island_enriched_threshold (File: compute_background_probabilites, Log level: DEBUG, Time: Thu, 03 Nov 2016 21:58:51 )
4.0 gap_contribution (File: compute_background_probabilites, Log level: DEBUG, Time: Thu, 03 Nov 2016 21:58:51 )
1.0 boundary_contribution (File: compute_background_probabilites, Log level: DEBUG, Time: Thu, 03 Nov 2016 21:58:51 )
/home/anish/.local/lib/python2.7/site-packages/epic/statistics/compute_score_threshold.py:22: RuntimeWarning: divide by zero encountered in log
score = -log(required_p_value)
Traceback (most recent call last):
File "./epic", line 218, in
run_epic(args)
File "/home/anish/.local/lib/python2.7/site-packages/epic/run/run_epic.py", line 47, in run_epic
compute_background_probabilities(nb_chip_reads, args)
File "/home/anish/.local/lib/python2.7/site-packages/epic/statistics/compute_background_probabilites.py", line 49, in compute_background_probabilities
boundary_contribution, genome_length_in_bins)
File "/home/anish/.local/lib/python2.7/site-packages/epic/statistics/compute_score_threshold.py", line 24, in compute_score_threshold
current_scaled_score = int(round(score / BIN_SIZE))
OverflowError: cannot convert float infinity to integer
What does this mean? I know that there should be broad peaks as I find them running MACS2 broad-peak (no-model) option.  Forgive me - I am new to these sorts of analyses.
Best,
Anish

Thanks for reporting. It seems like epic cannot interpret your files. What do they look like?
Please post the output of
head <yourfiles> | cat -et

to this thread.

Hi,
Sorry for the late reply. The following was what I inputted into epic:
./epic --control /pathtofolder/lib.filtered.input.sorted_2_MARKDUP.bed --treatment /pathtofolder/lib.filtered.H3K27me3_2_new.sorted.MARKDUP.bed --number-cores 30 --fragment-size 300 --chromsizes /pathtofolder/Asxl.size.file --effective_genome_size 6e8 > /pathtohomefolder/h3k27.broad.csv
My input folder looks like this:
scaffold4^I1^I160^INB501801:1:HN3WLBGXY:4:11601:9830:10032^I159$
scaffold4^I1^I164^INB501801:1:HN3WLBGXY:3:13412:18598:13811^I163$
scaffold4^I1^I167^INB501801:1:HN3WLBGXY:3:22404:14294:20264^I166$
scaffold4^I15^I189^INB501801:1:HN3WLBGXY:2:23204:7996:11409^I174$
scaffold4^I1^I201^INB501801:1:HN3WLBGXY:3:21609:2881:5564^I200$
scaffold4^I46^I230^INB501801:1:HN3WLBGXY:4:23510:23247:4818^I184$
scaffold4^I67^I239^INB501801:1:HN3WLBGXY:4:11406:17309:7190^I172$
scaffold4^I80^I273^INB501801:1:HN3WLBGXY:4:21606:9304:15988^I193$
scaffold4^I76^I287^INB501801:1:HN3WLBGXY:1:22103:20705:12481^I211$
scaffold4^I95^I288^INB501801:1:HN3WLBGXY:3:23411:2064:14725^I193$
My treatment folder looks like this:
scaffold4^I1^I164^INB501801:1:HN3WLBGXY:3:13412:18598:13811^I163$
scaffold4^I1^I165^INB501801:1:HN3WLBGXY:4:12512:24813:1400^I164$
scaffold4^I9^I188^INB501801:1:HN3WLBGXY:3:23511:22654:9868^I179$
scaffold4^I15^I189^INB501801:1:HN3WLBGXY:2:23204:7996:11409^I174$
scaffold4^I1^I204^INB501801:1:HN3WLBGXY:4:21412:4710:15556^I203$
scaffold4^I55^I239^INB501801:1:HN3WLBGXY:4:11508:23962:14301^I184$
scaffold4^I42^I250^INB501801:1:HN3WLBGXY:3:21401:2738:10832^I208$
scaffold4^I76^I287^INB501801:1:HN3WLBGXY:1:22103:20705:12481^I211$
scaffold4^I91^I298^INB501801:1:HN3WLBGXY:3:12411:9664:14867^I207$
scaffold4^I87^I304^INB501801:1:HN3WLBGXY:2:21106:6046:15213^I217$
My chromsize folder:
scaffold4^I49623$
scaffold1^I75538$
scaffold2^I35872$
scaffold6^I61357$
scaffold3^I23435$
scaffold7^I107993$
scaffold10^I43946$
scaffold11^I23991$
scaffold8^I118074$
scaffold13^I28105$
I hope this helps. Thank you in advance.
Best,
Anish

Effective genome size should be a number between 0 and 1.
You have no strand info in your files.
On Sat, Nov 5, 2016 at 12:20 PM, anishdattani<EMAIL_ADDRESS>wrote:

Hi,
Sorry for the late reply. The following was what I inputted into epic:
./epic --control /pathtofolder/lib.filtered.input.sorted_2_MARKDUP.bed
--treatment /pathtofolder/lib.filtered.H3K27me3_2_new.sorted.MARKDUP.bed
--number-cores 30 --fragment-size 300 --chromsizes
/pathtofolder/Asxl.size.file --effective_genome_size 6e8 >
/pathtohomefolder/h3k27.broad.csv
My input folder looks like this:
scaffold4^I1^I160^INB501801:1:HN3WLBGXY:4:11601:9830:10032^I159$
scaffold4^I1^I164^INB501801:1:HN3WLBGXY:3:13412:18598:13811^I163$
scaffold4^I1^I167^INB501801:1:HN3WLBGXY:3:22404:14294:20264^I166$
scaffold4^I15^I189^INB501801:1:HN3WLBGXY:2:23204:7996:11409^I174$
scaffold4^I1^I201^INB501801:1:HN3WLBGXY:3:21609:2881:5564^I200$
scaffold4^I46^I230^INB501801:1:HN3WLBGXY:4:23510:23247:4818^I184$
scaffold4^I67^I239^INB501801:1:HN3WLBGXY:4:11406:17309:7190^I172$
scaffold4^I80^I273^INB501801:1:HN3WLBGXY:4:21606:9304:15988^I193$
scaffold4^I76^I287^INB501801:1:HN3WLBGXY:1:22103:20705:12481^I211$
scaffold4^I95^I288^INB501801:1:HN3WLBGXY:3:23411:2064:14725^I193$
My treatment folder looks like this:
scaffold4^I1^I164^INB501801:1:HN3WLBGXY:3:13412:18598:13811^I163$
scaffold4^I1^I165^INB501801:1:HN3WLBGXY:4:12512:24813:1400^I164$
scaffold4^I9^I188^INB501801:1:HN3WLBGXY:3:23511:22654:9868^I179$
scaffold4^I15^I189^INB501801:1:HN3WLBGXY:2:23204:7996:11409^I174$
scaffold4^I1^I204^INB501801:1:HN3WLBGXY:4:21412:4710:15556^I203$
scaffold4^I55^I239^INB501801:1:HN3WLBGXY:4:11508:23962:14301^I184$
scaffold4^I42^I250^INB501801:1:HN3WLBGXY:3:21401:2738:10832^I208$
scaffold4^I76^I287^INB501801:1:HN3WLBGXY:1:22103:20705:12481^I211$
scaffold4^I91^I298^INB501801:1:HN3WLBGXY:3:12411:9664:14867^I207$
scaffold4^I87^I304^INB501801:1:HN3WLBGXY:2:21106:6046:15213^I217$
My chromsize folder:
scaffold4^I49623$
scaffold1^I75538$
scaffold2^I35872$
scaffold6^I61357$
scaffold3^I23435$
scaffold7^I107993$
scaffold10^I43946$
scaffold11^I23991$
scaffold8^I118074$
scaffold13^I28105$
I hope this helps. Thank you in advance.
Best,
Anish
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/endrebak/epic/issues/45#issuecomment-258605473, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQ9I0nN8mE_fLgCVzVNXL6zX6hMGASOtks5q7GZ1gaJpZM4KpblD
.


How to add references to assemblies like System.Text.RegularExpressions?

Hi there. I'd like to do some processing on measures... but I need regexes for this. How can I add a reference to the assembly in the script? Thanks.

The assembly is already included, but you need to fully qualify all calls to the Regex class, like so:
if(System.Text.RegularExpressions.Regex.IsMatch(Selected.Measure.Name, "hello"))
{
    ...
}

using keyword now supported in 2.8.6.


Reactivating terminal doesn't end

Testing #22079
I couldn't get this to work. What I did:

Clone https://github.com/TheAlgorithms/Python
Checked there's no .venv/.conda
Tried running a file via play button, it ran:

I see this in the bottom left and it doesn't go away:

It means "reactivating terminal".

I tried commenting out my settings.json file entirely and reloading the window, I still see the message:

This is on a very new macbook and I think this is the first time I've used Python on it.
Python ext v2023.17.12691017

Thanks, closing as dup of https://github.com/microsoft/vscode-python/issues/22087.


Add metadata info to matter-lock base-lock profile

This PR adds UI metadata of matter-lock device. Since Matter Clusters and SmartThings Capabilities is different, it should be displayed as a different UI.

 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.

What does adding this custom metadata fix? Usually we try to avoid this wherever possible.

Problem
The problem is that the lock state condition that cannot be executed in the automation UI of the matter-lock device is displayed. Five lock states are displayed in the automated UI, but the matter-lock device actually only supports three lock states. The user can even create automation by selecting conditions that the matter-lock device does not support.
Cause
Since base-lock profile of matter-lock driver has not declared that it uses custom UI metadata, it displays the UI using a generic lock device UI metadata. This is made based on SmartThings Capabilities. The lock attribute of the lock capabilty has the following values:

locked - The device is locked
unknown - The state of the device is unknown
unlocked - The device is unlocked
unlocked with timeout - The device is unlocked with a timeout

In the automation UI's lock state conditions of the generic lock device UI metadata, based on above values, the following menus are displayed:

Locked or Unlocked
Locked
Unlocked
Unknown
Unlocked with timeout

Unfortunately, LockState Attribute has only three possible values in Matter Clusters:

Not Fully Locked
Locked
Unlocked

Only Locked and Unlocked between Matter Clusters and SmartThings Capabilities can be mapped to each other in automation UI.	If the user selects "Unknown" or "Unlocked with timeout" from the automation UI, it can never run.
Solution
First, I added matter-lock( this is presentation id, not driver name ), a custom UI metadata that only displays the lock/unlock related menus in the automation UI. This PR uses this in the base-lock profile of matter-lock driver.
References

https://developer-preview.smartthings.com/docs/devices/capabilities/capabilities-reference/#lock

Once the feature is released, I think we will prefer #314 over this to avoid having to maintain and understand ui metadata for devices.

@cjswedes , @greens I just installed and tested #314 and it works well. Thank you, I will close this PR.


MS Docs I18l: Please switch off English overlays

Reading the German edition of MS Docs is rather cumbersome and irritating.
The way the two language versions are presented on the same page is utterly confusing and annoying. These overlays popping up whenever the mouse cursor accidentally hovers over a paragraph very much interfere with the process of reading, particularly when the page is being scrolled using the keyboard while the mouse pointer just rests on the page. This is also true when the reader is about to set a temporary bookmark to a paragraph with the mouse pointer or when the reader wants to select and/or copy a few words from the text.
Instead of showing these disturbing overlay pop-ups, I'd like to suggest to add kind of a navigation bar to the left (or right) text page border (i.e. outside the actual text). When clicking (or, alternatively, hovering) this bar, the corresponding paragraph should temporarily display in English.
Here's the link depicting details plus some visuals to my suggestion:
https://social.msdn.microsoft.com/Forums/en-US/5e530984-edf6-4aed-9a21-bd19657f65a3/msdn-library-international-please-switch-off-english-overlays

⚠ Idea migrated from UserVoice
Created By: AxelD
Created On: 2017/03/07 17:49:35 +0000
Votes at Migration: 1
Supporters at Migration: 1

@SonjaSaltzman @nokura as FYI on the ask.

Duplicate of #23


Type-Safe Input

https://gist.github.com/calebkleveter/9f269d8f5323f2a4679be53e57939c9e
Note: This issue will be fleshed out more when I have time.

One caveat to consider with this implementation vs. the enum based one is that each call to get an option or argument (i.e., let name = try context.argument(\.name)) is passing around the entire Argument struct, including all of the help and name strings.
The enum approach on the other hand, although a bit more verbose, would only access the name, help, or short flag as needed (computed property) which seems a little cleaner.
class SomeCommand: Command {
    enum Arguments: String, CommandArgument {
        case string, count

        var help: String? {
            switch self {
            case .string: return "The string to print to srdout"
            case .count: "The number of times to output the string"
            }
        }
    }

    enum Options: CommandOption {
        case verbose

        var help: String? {
            switch self {
            case .verbose: return "List each output on its own line"
            }
        }

        var shortFlag: Character? {
            switch self {
            case .verbose: return "v"
            }
        }
    }

    func run(on context: CommandContext<SomeCommand>)throws -> Future<Void> {
        let name = try context.argument(.name)
        let count = try context.argument(.count)

        if try context.options(.verbose) {
            (1...count).forEach { _ in print(name) }
        } else {
            print(String(repeating: name, count: count))
        }

        return Future(())
    }
}

Here when you call let name = try context.argument(.name) only the enum value (probably a single byte) is being passed. There's also no KeyPath required.

https://forums.swift.org/t/pitch-type-safe-input/21650


Password Does Not Match error

Hi,
I tried to do JWT, when running the validate command I get the above result.
In the DB, email is<EMAIL_ADDRESS>password is 123456789 (unhashed)
Is the password supposed to be hashed in the database? If so, what is the hashing. The docs could improve on this as I spent a few hours trying to get this simple thing to work... but still failed...

Hi,
I just went through the adonis-auth sources, and I saw the hash being done.
I managed to get it to work, and will close this. I will do a write up to improve the docs, please ignore my PR later if you feel there is no need to, so far I am liking the framework and hope it will improve over time with help from the community.
I have some basic knowledge on how laravel works, so moving around wasn't too hard. I am a user of Sequelize ORM but it took me alot of time to master the more complex part. Lucid looks easier and better and I hope to test drive the more complex things like relations

Fixed. The 5th point http://adonisjs.com/docs/3.1/authentication#_about_authentication

I have the same question, @ais-one can answer me how you use auth when the password is not hash ou crypt?

Hi
I decided to use expressjs instead and scaffold everything properly...
On Fri, Feb 21, 2020, 03:34 Mauricio Arantes<EMAIL_ADDRESS>wrote:

I have the same question, @ais-one https://github.com/ais-one can
answer me how you use auth when the password is not hash ou crypt?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adonisjs/adonis-auth/issues/25?email_source=notifications&email_token=ABAWBHT7ZIUMNPR5LZMJQG3RD3LLTA5CNFSM4CWZHVHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMPYR7A#issuecomment-589269244,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABAWBHS6SMOEJ47NUV5EENDRD3LLTANCNFSM4CWZHVHA
.

Hey @Charada32! 👋
You can create your own Authentication service. Retrieve the user, manualy check the password and set its ID in its session.


Fix proguard issues

Currently proguard minimization and obfuscation makes the app useless

Not possible atm due to proguard bug (https://sourceforge.net/p/proguard/bugs/731/)


What is tiledgrid?

Hello, I am new to this field. I understand that hash encoding comes from InstantNGP but which paper does 'tiledgrid' come from?
Even I googled it but nothing came out...

You may check this issue: https://github.com/NVlabs/instant-ngp/issues/97


Set k8s log extension to .log instead of .txt

 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.Douglas Vaghetti seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Show error information on screen in case of incorrect URL

Thanks for this add-on. It's really frustrating how Firefox doesn't include any search engine export/import functionality and copying and pasting the searchplugins folder doesn't work any more. Your add-on is a life saver!
I found in your add-on some error handling functionality that perhaps should be refined. When an URL is introduced but it's incorrect or it doesn't contain the %s search term placeholder an ambiguous error is thrown in console. However this is an insufficient way of handling this kind of errors since you have to open the dev tools to know about them. And even so it's not clear what's the cause of the error.
I think these errors should be shown on the browser window below the Add search engine button like on this mock-up:

Hello, thanks for the suggestions!
I will work on them shortly.

I have updated the addon to display input validation errors as notifications:


Simple Oauth solution

Hi all,
Oauth is hard using separate passports plugins for different providers doesn't seem like the best solution.
Looking at issues #973 & #133 amongst other FCC had faced these issues as well.
So we have build a auth server in node from ground up which works well with passport - Its called connect.
FCC users will be able to use a lot many more providers by adding very simple configurations and without the need of any additional packages.
I would like to invite you guys to have a look at connect and ask me any questions you may have. Connect is open source as well and thus there is synergy there.
If you feel connect is something that can be used with FSS will be happy to submit a PR.
Cheers
Adi

@adi-ads Thanks for letting me know about this.
While it looks like a cool project, we will not be moving away from passport anytime soon.
I would also suggest changing the name as connect is a well established node module that has been around longer then express.
P.S. Not sure what FSS is? Did you mean FCC(Free Code Camp)?

m real bad with abbreviations, meant FCC.
We are looking into other names as well :)
Connect works with passport only underneath, just adds a layer on top for consistent and easy Oauth support.
Let us know if you guys ever want to chat about authentication in general have quite a few experts in the organisation. And we are always looking at opensource projects that help the community.


Rename epoll_amd64.go to epoll.go

Signed-off-by: Lei Jitang<EMAIL_ADDRESS>

LGTM

This actually might fix #193. IANAM, but LGTM.


Dark clear during cluster connect in light theme UI

There is a flash of dark when connecting to a cluster for light theme UI.
https://user-images.githubusercontent.com/40840436/143148043-e4afaf0c-0e10-4644-a873-c5dfec10a63f.mov
5.3.0-beta.2

It looks very similar in my case:
https://user-images.githubusercontent.com/12832754/143279830-df37a02b-f159-42e0-a7a7-d1b9a1646e9e.mov
I am running  Lens 5.2.7-latest.20211110.1 and macOS 12.0.1 on an M1 Pro.
I installed Lens yesterday and everything was working fine. After the first start today, I couldn't load the cluster page.
Neither restarting Lens, the Mac nor removing and re-adding the cluster to the kubeconfig seem to help.
Looking at the dev-tools console, I am getting a couple of errors but I am not sure whether they are related to the loading of the cluster page:
[IPC]: failed to send IPC message "extensions:renderer" to view "window=2"
"Error: Could not call remote method 'send'. Check that the method signature is correct. Underlying error: Object has been destroyed
Underlying stack: TypeError: Object has been destroyed
    at Object.b.send (electron/js2c/browser_init.js:161:2484)
    at /Applications/Lens.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:454:71
    at IpcMainImpl.<anonymous> (/Applications/Lens.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/main/server.js:313:27)
    at IpcMainImpl.emit (events.js:315:20)
    at IpcMainImpl.EventEmitter.emit (domain.js:467:12)
    at Object.<anonymous> (electron/js2c/browser_init.js:161:10374)
    at Object.emit (events.js:315:20)
    at Object.EventEmitter.emit (domain.js:467:12)
    at Object.emitter.emit (/Applications/Lens.app/Contents/Resources/app.asar/node_modules/@sentry/electron/dist/main/integrations/electron.js:63:25)
"

@DerGut Actually what you are experiencing is #4018. Can you try the latest (and final beta) and see if your problem persists?

Thanks! I'll move the conversation there 👍


Initial Commit ABILITY_TPS_Crouch

Hi Luke! Fun stuff! Hope you like it :)
Devlog: https://www.tobar.io/devlog-feature-ability_crouch/
Attention:

I made a separate Animator
Animations are from Mixamo
I hijacked the Demo Scene to show off the tunnel Detection Overwritten the player Prefab of course
Camera height (root) gets changed on Crouch. It feels a bit unsafe. Maybe it's an idea to couple the root to the Skeleton, so it follows the movement automatically.
Autocrouch Detection is on "Default" Layer because I dont wanted to create an extra Layer in the project. It still works, though ;)

Features

The crouching ability can be triggered by toggling or holding
An “over-the-shoulder” cinemachine camera gets activated, as soon as the view gets narrower (I'm using the thirdpersonaim Camera)
The player will only stand up if there is enough headroom, to reduce clipping
The component will detect if there is a space in walking direction where crouching is possible
On detection the component will automatically call "Crouch()", if enabled

Bug: The SprintStamina depletes on crouch, when pressing the sprint-key.

I don't know what Etra will say about the Mixamo animations, but otherwise it looks very well done. The only thing we may change past bug fixing is making our own animation for crouching.

Also, feel free to join the community and development discord. The link for the latter is in the "volunteer" channel of the community server, which is linked in the README and the assets.

Hey! From testing it using the default armature in the No Character Demo, I found a couple issues I'll need you to address. The big one is that the controller isn't properly detecting the tunnel as a physical object in the demo, and is as such letting you stand up in the middle of it, clipping the character into the ceiling. As well as this, when leaving a surface you're clipped into, it adds a very large sum of velocity in the direction you left it at. If you can get this bug fixed and produce me with a short demo of it working with the obstacle in question using your animations, I can put it under review again and sign off on it

Don't mind my silliness, I just realized you hijacked the TPS demo for it. Still should be brought to your attention that it doesn't work properly out of the box from making a new character controller and adding the ability, as described before

Hi, the layer masks should be set do the layer the tunnel has, maybe we should set it to default by default. The propelling out of the tunnel behaviour happens when the character controller size changes and collides with the tunnel roof. This should also not happen when the collider masks are set. To make it work out of the box I just can set the defaults in the script. Will fix that.

I'll look into the new commit. For context, the crouching sections there used box colliders to assist with collision. I didn't check how your tunnel was

Yep! Looks good. I'll put on an approval for merging, but we'll probably still need to make new animations for it, so you can run us through how you set it up in the server once Etra lets you in.


Documentation updates

Fixes workflow (can't be tested immediately since GH Actions is broken right now)
Set up conf.py to work on server where rabpro + env aren't installed
Add page about GEE and data requirements - still needs a bit more about custom datasets

Is there info in docs/source/data/index.rst that should go in the README? Alternatively, we have a very bare README that points to the docs.


Istio-proxy doesn't work after reboot instance with pilot

Describe the bug
Hello!
I have Kubernetes cluster in AWS which was instaled by kops(3 master and 3 nodes)
I added Istio with next components to my claster:

istio-citadel
istio-ingressgateway
istio-egressgateway
istio-pilot
istio-sidecar-injector

I created new nemaspace with istio-injection label and deployed my application to this namespaces.
Everything works well, my aplication is available via ingressgateway. But, when I restart instance with pilot, all pods with istio-proxy on this instances crash and new pods on this instance in the namespace will crash too.
It looks like the problem is observed only on the instance with pilot
When I open istio-proxy log I see the nex error:
[2018-08-14 10:02:58.560][17][info][main] external/envoy/source/server/server.cc:198]   stat_sinks: envoy.dog_statsd,envoy.metrics_service,envoy.stat_sinks.hystrix,envoy.statsd
[2018-08-14 10:02:58.560][17][info][main] external/envoy/source/server/server.cc:200]   tracers: envoy.dynamic.ot,envoy.lightstep,envoy.zipkin
[2018-08-14 10:02:58.560][17][info][main] external/envoy/source/server/server.cc:203]   transport_sockets.downstream: alts,envoy.transport_sockets.capture,raw_buffer,tls
[2018-08-14 10:02:58.560][17][info][main] external/envoy/source/server/server.cc:206]   transport_sockets.upstream: alts,envoy.transport_sockets.capture,raw_buffer,tls
[2018-08-14 10:02:58.562][17][info][config] external/envoy/source/server/configuration_impl.cc:50] loading 0 static secret(s)
[2018-08-14 10:02:58.564][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, no healthy upstream
[2018-08-14 10:02:58.564][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:41] Unable to establish new stream
[2018-08-14 10:02:58.564][17][info][config] external/envoy/source/server/configuration_impl.cc:60] loading 0 listener(s)
[2018-08-14 10:02:58.564][17][info][config] external/envoy/source/server/configuration_impl.cc:94] loading tracing configuration
[2018-08-14 10:02:58.564][17][info][config] external/envoy/source/server/configuration_impl.cc:103]   loading tracing driver: envoy.zipkin
[2018-08-14 10:02:58.564][17][info][config] external/envoy/source/server/configuration_impl.cc:116] loading stats sink configuration
[2018-08-14 10:02:58.564][17][info][main] external/envoy/source/server/server.cc:410] starting main dispatch loop
[2018-08-14 10:02:59.833][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, no healthy upstream
[2018-08-14 10:02:59.833][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:41] Unable to establish new stream
[2018-08-14 10:03:05.027][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, no healthy upstream
[2018-08-14 10:03:05.027][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:41] Unable to establish new stream
[2018-08-14 10:03:32.284][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, no healthy upstream
[2018-08-14 10:03:32.284][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:41] Unable to establish new stream
[2018-08-14 10:04:01.078][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, no healthy upstream
[2018-08-14 10:04:01.078][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:41] Unable to establish new stream
[2018-08-14 10:04:08.980][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, no healthy upstream
[2018-08-14 10:04:08.980][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:41] Unable to establish new stream

or
[2018-08-14 11:35:34.919][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, upstream connect error or disconnect/reset before headers
[2018-08-14 11:35:50.979][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, upstream connect error or disconnect/reset before headers
[2018-08-14 11:36:23.941][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, upstream connect error or disconnect/reset before headers
[2018-08-14 11:36:57.023][17][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:240] gRPC config stream closed: 14, upstream connect error or disconnect/reset before headers

Version
Kubernetes:
kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.4", GitCommit:"5ca598b4ba5abb89bb773071ce452e33fb66339d", GitTreeState:"clean", BuildDate:"2018-06-06T08:13:03Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-17T18:43:26Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

Istio: 1.0.0
Is Istio Auth enabled or not?
No
Environment

AWS
Kops: 1.9.2
Network: flannel
OS-image: CoreOS 1800.6.0

How to fix it
I found only one way to fix it:

delete all kube-dns pods
delete istio-pilot pod

But sometimes it doesn't help

Please close the issue.
It was bug in old version of flannel plugin


[tiff] Update to 4.7.0

A post-build check error occurred:
Installing 20/26<EMAIL_ADDRESS>Building<EMAIL_ADDRESS>
...

-- Performing post-build validation
E:\tiff\ports\tiff\portfile.cmake: warning: The following executables were found in ${CURRENT_PACKAGES_DIR}/bin or ${CURRENT_PACKAGES_DIR}/debug/bin. Executables are not valid distribution targets. If these executables are build tools, consider using `vcpkg_copy_tools`.  These are usually caused by bugs in portfile.cmake or the upstream build system. Please correct these before submitting this port to the curated registry.

A post-build check error occurred:

Fixed. Probably not a regression. Unfortunately, that check is only executed on windows, and [tools] is not tested in CI.

All features are tested successfully in the following triplet:
x86-windows
x64-windows
x64-windows-static


BlackParrot exponential parser time

Antlr (and or the grammar) has difficulties with this code, the if else ... goes exponential in Antlr.
ScratchPad.sv.gz

It does.
Yesterday I tried to add some of the tricks from sv2017 (The lookahead of one), and even remove temporarily
primary
: primary_literal
//    | complex_func_call
and replace it with primary ( list_of_params )
But it did not solve the issue.
This looks like it is going to take a while to solve. In the meantime, the Blackparrot guys are trying to rework that piece of RTL.

If you can help experimenting with some of the diffs from sv2017, try to bring the minimum change in SV3_1a that would solve this issue that would help. I'll also spend some cycles in the next weeks.

I got a 2x runtime factor...

The grun does not use semantic predicates, the speedup is probably 1 order faster.

The grun does not use semantic predicates, the speedup is probably 1 order faster.

I don't understand what you say here.
The testRig/grun use the standard runtime from the jar file. Which honor semantic predicates otherwise this tool can't be use to develop grammar, even for a java application.

https://github.com/Nic30/hdlConvertor/blob/master/grammars/sv2017Parser.g4#L402
I do not remember specifics, but how does _input->LA(1) compile to java then?

If you can help experimenting with some of the diffs from sv2017, try to bring the minimum change in SV3_1a that would solve this issue that would help.

By commenting identifier alternative in primary_literal :
primary_literal
    : number
    | time_literal
    | unbased_unsized_literal
    | string_value
//    | identifier
    ;

I pass from 490 Ambiguity to 239 on ScratchPad.sv testcase. However from runtime perspective the gain is still marginal (may be 3s on my workstation with testRig ). Also even if this a small change the resulting matched rule is different and break the regression.
I think that what you request or expect could not be achieve : removing ambiguity, require to change the grammar. Any ambiguity related to hierachical/scope /identifier /function/method call (the one who are currently killing the perf in the current testcase) will have serious impact on existing code database because they are almost every where...
Note : I achieve a similar result by removing primary_literal ( by inlining the rule and removing the simplest aternative)  ... the impact was even worse : it break the compilation :  VObjectType::slPrimary_literal disappear. I was not able to identify how to fix the code.

@Thomasb81, assume we can change the code base, the first order should be to identify the ambiguities that surface in this test

SV3_1aParser.g4.tar.gz
With this java version of the grammar, I was able :

to pass from 565 to 241 reportAttemptingFullContext.
to pass from 467 to 138 reportAmbiguity
compare to the one currently in database.

I am still not able to observe a  significant and noticeable performance gain on this testcase ... probably antlr runtime has some threshold effect ...
I am not always sure that change in the grammar are legal and will preserve the correct parsing of some systemVerilog construction, because all possible syntax are not expose in this testcase. Sometime it is difficult to identify the usecase from an allowed syntax or you are simply not aware or LRM is wrong...
It is not easy to re-use other surelog test because they may contain preprocessing directive not directly compatible with this grammar.
Remaining major and expected contributor of ambiguity are still around hierarchical identifier/function/method/system call where the tool seem to loose efficiency in order to identify the right grammar that match the statement.

Here is an article on antlr performance
https://tomassetti.me/improving-the-performance-of-an-antlr-parser/
I observe that when this grammar is run through vscode / https://github.com/mike-lischke/vscode-antlr4 (v2.2.4) with the appropriate change to conform predicate to javascript runtime. (The one in place can even be removed to ease runtime
switch)
The testcase is process in few second ! against still about 1 minute 30s with the java 4.9.2 runtime on my computer...
I did not expect that at all...

[  FATAL] : 0
[ SYNTAX] : 0
[  ERROR] : 1
[WARNING] : 2
[   NOTE] : 5

real	0m0,061s
user	0m0,053s
sys	0m0,008s

The runtime seems now quite descent. I would propose to close this issue.


Nhost Dashboard behave differently in light and dark theme

Describe the bug
The Docs and profile icon position itself in the center in the light theme and on the right in the dark theme in the Dashboard. There is a hamburger icon on the right in the light theme without opening any menu.
Light theme

Dark Theme

Someone, please confirm if this is happening only to me.
To Reproduce
Steps to reproduce the behavior:

Follow the DEVELOPERS.md and run the react-apollo example.
Open the Nhost dashboard.

Expected behavior
The Docs and profile icon should be on the right in the light theme
Desktop (please complete the following information):

OS: Macos
Browser Chrome

I tried reproducing this issue using the same dashboard version (0.11.17) with no luck. I'd be surprised if this would be caused by switching between light and dark modes considering that there are no conditionally rendered elements for any of these themes.
The only way I could reproduce this is by manually removing the sm:hidden class from the mobile menu's button. I don't see how that would be possible other than doing this by hand.

With the latest version, I also could not reproduce it. I guess all is good now👍


[BUG]: Chakra UI Table's <ColumnSorter /> icon not shown

Describe the bug
In our Chakra UI examples, Chakra UI Table's <ColumnSorter /> icon is not shown.
We can solve this problem like in this PR.
Steps To Reproduce

clone refine repo
run any chakra-ui example. see contributing guide
look table's column

Expected behavior
<ColumnSorter /> icon is should shown
Screenshot

Desktop
No response
Mobile
No response
Additional Context
No response

Assign this to me

Where can i find exactly the table in the website?

Hey @alicanerdurmaz, is this issue still open?

Yeah you can do it @sjcode99

Hey @alicanerdurmaz @nitinryali, fixed the bug for the ColumnSorter icon in the Chakra UI table. Please check it and let me know if anything else is required.


Hygieia allow to group Jenkin jobs

Team,
From my understanding Hygieia is showing data from Jenkin job individually. Is there a option to group data from different jobs. For example, build count for a LOB.

I suggest you look at the "product" dashboard. May be we can provide a roll up numbers in that view?

Thank you :)


CSharp constant in const.go

As a part in https://github.com/aquasecurity/trivy/pull/686, this pull request adds CSharp constant in the vulnsrc/vulnerability/const.go file.

this is probably quite nit-picky, but should it be "c-sharp" or something more generic like "dotnet"? It seems like this will support scanning any nuget/.net projects irrespective of the language.

Hi there @chgl! That was my initial thought too actually, but seeing all the other language constants was a language rather than a ecosystem, I wanted to keep it in line with the standard :)

Could you replace c-sharp with dotnet?

Unfortunately, there is a conflict now. Would you resolve it?

Unfortunately, there is a conflict now. Would you resolve it?

Haha, yes ofc, I should have noticed that :)

Rebased :)

Thanks! Please let me merge the PR after finalizing https://github.com/aquasecurity/trivy/pull/686. We may need further change.

Oops, I migrated from master to main and this PR was deleted by mistake...

No problems! As long as the const gets in it's all good :)


Metrics: Simplify and speed-up access to TelemetryClient.GetMetricManager(..) by avoiding the ConditionalWeakTable.

Address issue https://github.com/microsoft/ApplicationInsights-dotnet/issues/1196
This is a minor change removing ConditionalWeakTable in favor of a private field access.
Thanks for considering this.

Closing old with PR with no updates. It may be best to submit new PR with the change to avoid conflicts.


Vim9: crash when re-sourcing plugin manually

Describe the bug
In Vim9 script, re-sourcing a plugin manually might make Vim crash.
To Reproduce
Run this shell command twice:
vim -Nu NORC -i NONE -U NONE --cmd 'set rtp=/tmp/some' -S <(cat <<'EOF'
    vim9script
    var lines =<< trim END
        vim9script
        if exists('g:guard')
            finish
        endif
        g:guard = 1
        var name = ''
        set ls=2 stl=%!Stl()
        def g:Stl(): string
            return name
        enddef
    END
    mkdir('/tmp/some/plugin', 'p')
    writefile(lines, '/tmp/some/plugin/script.vim')
    redraw
    so /tmp/some/plugin/script.vim
EOF
)

Vim crashes.
The command needs to be run twice:

the first time, it writes some script in /tmp/some/plugin/script.vim

the second time, it causes Vim to source this script twice:

a first time during startup (because of -Nu NORC and --cmd 'set rtp=...')
a second time after startup (because of :source)

Expected behavior
Vim doesn't crash.
Environment

Vim version: 8.2 Included patches: 1-2202
OS: Ubuntu 16.04.7 LTS
Terminal: xterm(362)

Additional context
Regression introduced in 8.2.1126.
Before that, Vim did not crash.  Instead, it raised this error:
E1016: Cannot declare a global variable: g:statusline_winid

backtrace
valgrind log
asan log

Sorry for the not so minimal example, but that's the best I could get.
For reference, I stumbled upon this after running this function (via a custom command):
def Func()
    PlugInstall
enddef

The :PlugInstall command comes from here.
I have no idea whether the reported crash is the same though.  When I started the debugging, and Vim crashed, it raised E565:
Vim(argglobal):E565: Not allowed to change text or change window:                 argg | %argd

But quickly after starting removing code, the error was not raised anymore.  So, maybe there is another crash.  I'll have to check once this one is fixed.

The command needs to be run twice:

That is, it needs to be run once, then :q to quit Vim, then re-run the same shell command.

The problem is reloading a script after a function was compiled, which accesses a script-local variable which was deleted because of the reloading.  That the function fails is to be expected, since the script-local variable was deleted.  But it should not crash.

Thank you for the explanation and the patch.  However:

a script-local variable which was deleted because of the reloading.

This causes a fundamental issue.  A plugin might reload other plugins.  This is the case of the most popular plugin manager, vim-plug.
If script-local variables are deleted, when a plugin is reloaded either by another plugin or accidentally, its internal state is reset which might break it.  This is the case for my statusline plugin.  That's one of the reasons why plugin authors write a guard at the top of their scripts.  This is even documented at :h 41.11:
https://github.com/vim/vim/blob/4aab88d919168ce2ddf4845482f4cff9efa52b5b/runtime/doc/usr_41.txt#L2029-L2036
While this kind of guard worked in Vim script legacy, it longer works in Vim9.  In Vim9, the script-local variables are reset, even if the guard prevents any further command from being executed, which is a bit surprising for someone who doesn't know how Vim9 works internally.  And functions don't seem to be deleted which might add to a user's confusion.  I guess it's their compiled code which is preserved.
And now, in addition, E1149 is raised.
When reloading a script, instead of deleting all variables immediately, could Vim9 wait until it finds an assignment to a script-local variable?  This way, if there's a guard at the top, and a :finish causes the sourcing to be interrupted, the variables would be preserved.
Otherwise, how are we supposed to preserve the internal state of a plugin across reloads (be they voluntary or accidental)?

In Vim9, the script-local variables are reset, even if the guard prevents any further command from being executed

For example, consider this snippet:
vim9script
var name = ''
def Func()
    # ...
enddef

And suppose that Func() alters the script-local variable name at runtime.  If there's no guard, when we resource, it's reset to an empty string, because of this statement:
var name = ''

But this is wrong if Func() had already altered its value, and needed this value to be preserved to keep working as expected.
And if there is a guard, same issue: Vim seems to delete all script-local variables right before reloading a script, so name is again – unexpectedly – reset to an empty string.
No matter what we do, Func() has no guarantee that the value of name won't be altered during a reload.

This makes me think that the current guard mechanism is one area where Vim9 could – significantly – improve Vim script legacy.   It was annoying to always have to write this at the top of a script:
let s:cpo_save = &cpo
set cpo&vim

And this at the bottom:
let &cpo = s:cpo_save

Vim9 has improved the situation.  :vim9script takes care of that automatically.
The same issue applies to a guard.  It's annoying to always have to write this at the top of a script:
if exists('g:guard')
    finish
endif

This is a real pitfall which I suspect many plugin authors don't fully understand.  They think it's only required in a script under plugin/.  That's not true.  It might also be necessary in a script under autoload/, if the latter has an internal state in the form of script-local variables.  See here for a real example.
I think Vim9 should automatically fix this issue.  The simplest fix would be to simply disallow reloading plugins.  In the future, if some people complain that they want to be able to reload a plugin (which they might do during the development phase), maybe an option could be added to :source and :runtime, such as ++reload.  This option would force a reload which is normally disallowed.

The simplest fix would be to simply disallow reloading plugins.

And not raise any error.  Here, an error would be just be noise.  A plugin doesn't need to reload another plugin.  I don't know why vim-plug does it (it's not necessary for the :PlugInstall command).
The only case where reloading a plugin makes sense is for plugin authors while they're developing their code.  But if a plugin author writes a plugin in Vim9 script, we can expect they would take the time to at least briefly skim :h vim9-differences, where it could be documented that a script can't be reloaded (unless maybe with the aforementioned ++reload option).

The simplest fix would be to simply disallow reloading plugins.

Ah no, that's a bad idea.  I'm constanty reloading scripts while testing.  Unless, ++reload is also implemented.

Unless, ++reload is also implemented.

In which case it's still a good idea, because all you have to do is to tweak your custom mapping which resources a script (or install one if you didn't so far), to include ++curwin:
nno <key> <cmd>source ++curwin %<cr>

Obviously, if you use ++reload to reload a script with an internal state implemented with script-local variables, the latter will probably get broken.  But that doesn't matter, because:

that's unavoidable
it was already like that in Vim script legacy

The simplest fix would be to simply disallow reloading plugins.

And not raise any error.  Here, an error would be just be noise.  A
plugin doesn't need to reload another plugin.  I don't know why
vim-plug does it (it's not necessary for the :PlugInstall
command).
The only case where reloading a plugin makes sense is for plugin
authors while they're developing their code.  But if a plugin author
writes a plugin in Vim9 script, we can expect they would take the time
to at least briefly skim :h vim9-differences, where it could be
documented that a script can't be reloaded (unless maybe with the
aforementioned ++reload option).

I think it's quite normal to reload a Vim script file after making a
change.  I have an autocommand for when I write my .vimrc that reloads
it.  It does require a bit of care to make sure reloading works (this is
legacy Vim script) but usually it is fine.  And for this it's good to
clear everything the script has defined (user commands, functions,
script-local variables) and start with a clean slate.  E.g. if the
script was defining FuntionOne() and it's renamed to FunctionTwo() then
FunctionOne() should be gone after the reload.
Using some mechanism to bail out from the script is problematic.  Some
things may be done, e.g. setting buffer-local options.  But it conflicts
with the idea of reloading a script clears everything and starts with a
clean slate.  We can avoid that perhaps, but it should not be the
default.
The Vim9 mechanism for this is to use :import.  Then the imported script
will only be loaded if not loaded before.  Thus there is no need for a
"guard".
So what remains is scripts that intentionally bail out somewhere.  For
these everything should remain.  And probably no functions or
script-local variables will be redefined.  E.g. for a filetype plugin it
may set a few options and define a buffer-local mapping that calls a
script-local function:
setlocal someoption=value
command -buffer SomeCommand call s:SomeFunc()
if exists('*s:SomeFunc')
   finish
endif
func s:SomeFunc()
   ...

I think the best is if we specify early on that this script bails out
and existing script-local functions and variables should remain.  Since
:vim9script is the first command we could use an argument, e.g.
vim9script noclear

If "noclear" is omitted then this is where the script-local items are
cleared.  I think this makes sense.
--
How To Keep A Healthy Level Of Insanity:
7. Finish all your sentences with "in accordance with the prophecy".
/// Bram Moolenaar --<EMAIL_ADDRESS>-- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

The Vim9 mechanism for this is to use :import.  Then the imported script
will only be loaded if not loaded before.  Thus there is no need for a
"guard".

Yes, but it doesn't fix the issue of an involuntary plugin reloading.  Reloading a small script to test a feature, or developing a small piece of code is one thing, but reloading an entire plugin is another.  I never want a plugin to be reloaded (I had enough weird bugs because of that).  If I want to test a change in a plugin, I simply restart Vim. I have a mapping which automates the whole process:

create a Vim session file
send a signal to the parent shell to restart Vim when Vim is quit
quit Vim (the shell restarts a new Vim instance)
source the session file on startup to restore the layout and the buffers

But I use vim-plug which – for some reason – reloads all plugins when you use some of its commands.  That's the only reason why I write an anti-reinclusion guard at the top of every script under plugin/, and of every script under autoload/ if the latter uses script-local variables.  Even if vim-plug didn't reload plugins, I want the guarantee that no plugin will ever be reloaded.

I think the best is if we specify early on that this script bails out
and existing script-local functions and variables should remain.  Since
:vim9script is the first command we could use an argument, e.g.
   vim9script noclear

If "noclear" is omitted then this is where the script-local items are
cleared.  I think this makes sense.

Yes, this is much better than what I had in mind.  We can continue using :vim9script while testing or developing; then when we're finished, we simply write the noclear argument to avoid any issue if a plugin is reloaded involuntarily.

Yes, this is much better than what I had in mind. We can continue using :vim9script while testing or developing; then when we're finished, we simply write the noclear argument to avoid any issue if a plugin is reloaded involuntarily.

I assumed that noclear would behave exactly like an anti-reinclusion guard.  If it does not, noclear will still fix the reported issue, however, we won't be able to rely on it to disallow a reloading.  If so, would it be possible to add another argument for :vim9script?  The noreload argument?
:vim9script noreload

If it does not

What I mean is that maybe noclear will prevent a function or variable to be reset, but not something else, like an autocmd for example.  In that case, we might want something stronger than noclear.

I assumed that noclear would behave exactly like an anti-reinclusion guard.

And I was wrong.  If it did, we couldn't use it in a ftplugin.
So, noclear will be useful in a ftplugin, and noreload will be useful for the paranoids like me.

Yes, this is much better than what I had in mind. We can continue
using :vim9script while testing or developing; then when we're
finished, we simply write the noclear argument to avoid any issue if
a plugin is reloaded involuntarily.

I assumed that noclear would behave exactly like an anti-reinclusion
guard.  If it does not, noclear will still fix the reported issue,
however, we won't be able to rely on it to disallow a reloading.  If
so, would it be possible to add another argument for :vim9script?
The noreload argument?
:vim9script noreload

Hmm, I wonder how often users will run into problems because the script
doesn't seem to work, and only discover this "noreload" argument after
looking around for a while.
If we only implement "noclear" then you can do what you want, it just
takes a few extra lines:
vim9script noclear
if exists('s:loaded') | finish | endif
var s:loaded = true

And then you have the chance to do something before bailing out:
vim9script noclear

setlocal completefunc=Complete

if exists('s:loaded') | finish | endif
var s:loaded = true

def g:Complete()

(better use an autoload function though)
We already have this pattern, thus users won't be surprised.
The "noclear" argument is also a bit obscure and something you need to
understand, but I don't see how we can make things work without it.
--
Now it is such a bizarrely improbable coincidence that anything as
mind-bogglingly useful as the Babel fish could have evolved purely by chance
that some thinkers have chosen to see it as a final and clinching proof of the
NON-existence of God.
The argument goes something like this: 'I refuse to prove that I exist,' says
God, 'for proof denies faith, and without faith I am nothing.'
'But,' says Man, 'the Babel fish is a dead giveaway, isn't it?  It could not
have evolved by chance.  It proves you exist, and so therefore, by your own
arguments, you don't.  QED.'
'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
puff of logic.
'Oh, that was easy,' says Man, and for an encore goes on to prove that black
is white and gets himself killed on the next pedestrian crossing.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar --<EMAIL_ADDRESS>-- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

If we only implement "noclear" then you can do what you want, it just
takes a few extra lines:
vim9script noclear
if exists('s:loaded') | finish | endif
var s:loaded = true

True, noreload was just to save a few lines.  It's not as important as noclear.


Can PCGrad be used in conjunction with DWA？

hello,thanks for your work
I have a question about PCGrad and DWA
It is :Can PCGrad be used in conjunction with DWA？
if the answer is YES,
How can i apply it in the code?

Hi,
I am not quite sure what the DWA means. Is that https://arxiv.org/pdf/2010.14838.pdf ?

I mean Dynamic Weight Average，mentioned in the "End-to-End Multi-Task Learning with Attention",

I mean Dynamic Weight Average，mentioned in the "End-to-End Multi-Task Learning with Attention",

Yes it can.