Type-only export causes no exported member error in generated .d.ts file

Bug Report

🔎 Search Terms

"export type"
typeof
"has no exported member"
"type only export"
🕗 Version & Regression Information

This is the behavior I observed in versions: 4.5.0-dev.20210917, 4.4.3, 4.3.5, 4.2.4, 4.1.6
It did not occur in versions: 4.0.8, 3.9.10, 3.8.3
⏯ Playground Link

Sorry, I could not find a way to reproduce this in the bug workbench. Here is an attempt, but I could not find a way to disable angle brackets from being interpreted as JSX. Additionally, the error occurs when consuming generated .d.ts output, rather than in the initial compile pass.
💻 Code

// @filename: button.ts
import {classMap} from './lit.js';
export const c = classMap();

// @filename: lit.ts
class ClassMapDirective {}

export type {ClassMapDirective};

export const directive =
  <C>(class_: C) =>
  () => ({
    directive: class_,
  });

export const classMap = directive(ClassMapDirective);

The problem occurs in the generation of the .d.ts file for button.ts. The output is:
// @filename: button.d.ts
export declare const c: {
    directive: typeof import("./lit.js").ClassMapDirective;
};

🙁 Actual behavior

Compiling the generated button.d.ts file results in an error:
button.d.ts:2:42 - error TS2694: Namespace '"/home/aomarks/scratch/tsbug/lit"' has no exported member 'ClassMapDirective'.

2     directive: typeof import("./lit.js").ClassMapDirective;
                                           ~~~~~~~~~~~~~~~~~

🙂 Expected behavior

The generated button.d.ts file should compile without errors.
One thing I noticed is that removing the typeof operator from the generated button.d.ts file seems to fix the error. I wonder if this bug is related to that. Could it be that a symbol which is exported with a type-only export is already a type, unlike a normal export, so the use of a typeof operator is redundant and invalid, since typeof expects the LHS to be a value?

Pretty sure https://github.com/microsoft/TypeScript/pull/40985 is the change that broke this


Unified serialization + partial enum support

This PR contains 2 changes:

it unifies json serialization/deserialization codegen for DPG, MPG and HLC. Now all three use the same logic. However, generation of JsonPropertySerialization is flavor-specific, so one more PR will follow to resolve it
EnumType now created for InputEnumType in addition to ChoiceSchema/SealedChoiceSchema. DpgOutputLibrary can resolve enum types. Known issue: https://github.com/Azure/autorest.csharp/issues/2535

/check-enforcer override


Info.plist missing?

Hmm. I just did a carthage update --platform ios and I can't build PMKAlamofire because Info.plist is missing, yet still referenced in the project file. My Cartfile specifies ~> 3.2.

CI tests that our Carthage package builds and 3.2.4 passed:
https://travis-ci.org/PromiseKit/PMKAlamofire/jobs/516937986

Weird. I deleted the entire Carthage folder and tried again, and I still get this issue.

ProcessInfoPlistFile /Users/me/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/PMKAlamofire/bad-tag-3.2.4/Build/Intermediates.noindex/ArchiveIntermediates/PMKAlamofire/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/PMKAlamofire.framework/Info.plist /Users/me/Projects/Clients/Company/repo/iOS/Controller/Carthage/Checkouts/PMKAlamofire/Info.plist (in target: PMKAlamofire)
    cd /Users/me/Projects/Clients/Company/repo/iOS/Controller/Carthage/Checkouts/PMKAlamofire
    builtin-infoPlistUtility /Users/me/Projects/Clients/Company/repo/iOS/Controller/Carthage/Checkouts/PMKAlamofire/Info.plist -expandbuildsettings -format binary -platform iphoneos -o /Users/me/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/PMKAlamofire/bad-tag-3.2.4/Build/Intermediates.noindex/ArchiveIntermediates/PMKAlamofire/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/PMKAlamofire.framework/Info.plist
error: Build input file cannot be found: '/Users/me/Projects/Clients/Company/repo/iOS/Controller/Carthage/Checkouts/PMKAlamofire/Info.plist'

Yeah, your file is there. Something about checking out with Carthage makes the file not show up.

Well, I'm saying 3.2.4 checked out with Carthage and built in CI.
3.2.3 may well be different. Ensure you get 3.2.4

I wasn't clear. I tried forcing 3.2.3 in my Cartfile because a few days ago I was able to build just fine. It didn't help. The error is identical for ~> 3.2 (which I assume resolves to 3.2.4) and ~> 3.2.3. If I check out your code manually using git, I get a project file that contains Info.plist. Moreover, the project file I get via Carthage has Info.plist under Sources in the project file, but the one I check out manually has it at the top level.

If I specify == 3.2.3 in my Cartfile, everything builds

Delete the Carthage cache.

I tried that, but same result. When I cd into the org.carthage.CarthageKit/dependencies/PMKAlamofire directory, my bash prompt (which shows the current git branch) shows (BARE:(bad-tag-3.2.4)).

So you deleted the whole of org.carthage.CarthageKit?

Yup

Note that if I use == 3.2.3, the dependency shown is (BARE:(3.2.3)).

The bad-tag-3.2.4 tag is because I mucked up the main PromiseKit git submodule, so I have to preserve that. If Carthage is picking it that is strange. I'll change the name

K, done, delete cache and try again?

That worked, and without deleting the cache. Thank you!

Sorry about this issue!

No worries, thanks for fixing it so quickly!


bug fix and add integration test for service endpoint

Resolves #433 I think...

Codecov Report

Merging #434 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #434   +/-   ##
=======================================
  Coverage   76.58%   76.58%
=======================================
  Files          45       45
  Lines        2780     2780
=======================================
  Hits         2129     2129
  Misses        651      651

Continue to review full report at Codecov.

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


enable mobile push notifications

Currently working on the latest version of blink, should be able to enable it on flash also.

@islandbitcoin push notification is working on both android and ios for blink?

@brh28 Should we copy commits from blink repo to our repo or implement our own? Which one is better for you?

@brh28 And also, I may need your help to implement Notification Delivery Service (NDS)  on the backend using breez notify.

Notification types:

[ ] Ibex USD Payment receive
[ ] Breez BTC Payment receive
[ ] Ibex USD Onchain confirm
[ ] Breez BTC Onchain confirm
[ ] Price change
[ ] Marketing notification

2 issues I see on the backend so far:

Exception found in Honeycomb trace

UnknownNotificationsServiceError: Currency code is required with currency style.
    at handleCommonNotificationErrors (/app/lib/services/notifications/push-notifications.js:137:20)
    at lightningTxReceived (/app/lib/services/notifications/index.js:65:76)
    at /app/lib/services/tracing.js:335:35
    at AsyncLocalStorage.run (node:async_hooks:346:14)
    at AsyncLocalStorageContextManager.with (/app/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js:33:40)
    at ContextAPI.with (/app/node_modules/@opentelemetry/api/build/src/api/context.js:60:46)
    at Tracer.startActiveSpan (/app/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js:122:32)
    at Object.lightningTxReceived (/app/lib/services/tracing.js:333:36)
    at /app/lib/services/ibex/webhook-server/routes/on-receive.js:37:70
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Once we do figure this out, we'll need GOOGLE_APPLICATION_CREDENTIALS for notications to send.

PR to hopefully resolve the Currency code error mentioned above: https://github.com/lnflash/flash/pull/80

PR above has been merged and deployed.
Upon testing, notifcation did not get received but the logs seem to indicate it got triggered by our backend: https://ui.honeycomb.io/island-bitcoin/environments/test/datasets/test-ibex-webhook/result/JFYtswop8AE/trace/foU2QkhJyd7?fields[]=s_name&fields[]=s_serviceName&span=5df91fd27c5c8356
This could be resulting from me using graphene. @Nodirbek75 or @islandbitcoin if either of you could test on google Android and iOS, that would be appreciated

tested  on iOS, no notifications showing
tested on Android (GrapheneOS downloaded from PlayStore), no notifications showing
I tested on both staging and test environments

Deployed changes to fix currency amount in notification body (tested successfully) and update the firebase api call. Testing produces multiple notifications. The ibex-webhook shows the following logs:
{"level":30,"time":1723066820845,"pid":1,"hostname":"ibex-webhook-7fbc6cc545-hwcjx","module":"notifications","tokens":["fM32zYr8S0y4Ild1LnjVgS:APA91bGv0Q-r0nQHaQBAd7pNoGQS07Fj_HQzDqYWdIUiQlqHRwi0cHtAhIJdzvCG4yINVVD07dzcTJp2bfhaDXkARoUaO9gGfKIgGowzD4CjeTabjayNalv-FQnToxH3Mvr6bJ3YO_UD","crFblLFwR3elj6Ag7e4r_4:APA91bHePnyULjc0MIsFpK-LIE2ginLjo2ianDynxDbKYassUI-cp57Ob6UcVw-UGgMsw4VnkulpoPZkXXOHWyiz17gd5BOESfTn6e-cC2JrNs9xUbbBTBWc1Ws27FsYltYdKoAiu8VL"],"notification":{"title":"USD Transaction","body":"+$0.01"},"data":{"NotificationCategory":"Payments"}}
{"level":30,"time":1723066821256,"pid":1,"hostname":"ibex-webhook-7fbc6cc545-hwcjx","module":"notifications","response":{"responses":[{"success":false,"error":{"code":"messaging/registration-token-not-registered","message":"Requested entity was not found."}},{"success":true,"messageId":"projects/avid-ceiling-390418/messages/0:1723066821213317%5e8884415e888441"}],"successCount":1,"failureCount":1}}
/app/lib/services/ibex/webhook-server/routes/on-receive.js:52
    if (nsResp instanceof notifications_1.NotificationsService) {
               ^

TypeError: Function has non-object prototype 'undefined' in instanceof check
    at [Symbol.hasInstance] (<anonymous>)
    at /app/lib/services/ibex/webhook-server/routes/on-receive.js:52:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.16.0

And Honeycomb shows an InvalidDeviceNotificationsServiceError
Tested on Graphene Pixel 7a downloaded from play store

Deployed changes to fix currency amount in notification body (tested successfully) and update the firebase api call. Testing produces multiple notifications. The ibex-webhook shows the following logs:
{"level":30,"time":1723066820845,"pid":1,"hostname":"ibex-webhook-7fbc6cc545-hwcjx","module":"notifications","tokens":["fM32zYr8S0y4Ild1LnjVgS:APA91bGv0Q-r0nQHaQBAd7pNoGQS07Fj_HQzDqYWdIUiQlqHRwi0cHtAhIJdzvCG4yINVVD07dzcTJp2bfhaDXkARoUaO9gGfKIgGowzD4CjeTabjayNalv-FQnToxH3Mvr6bJ3YO_UD","crFblLFwR3elj6Ag7e4r_4:APA91bHePnyULjc0MIsFpK-LIE2ginLjo2ianDynxDbKYassUI-cp57Ob6UcVw-UGgMsw4VnkulpoPZkXXOHWyiz17gd5BOESfTn6e-cC2JrNs9xUbbBTBWc1Ws27FsYltYdKoAiu8VL"],"notification":{"title":"USD Transaction","body":"+$0.01"},"data":{"NotificationCategory":"Payments"}}
{"level":30,"time":1723066821256,"pid":1,"hostname":"ibex-webhook-7fbc6cc545-hwcjx","module":"notifications","response":{"responses":[{"success":false,"error":{"code":"messaging/registration-token-not-registered","message":"Requested entity was not found."}},{"success":true,"messageId":"projects/avid-ceiling-390418/messages/0:1723066821213317%5e8884415e888441"}],"successCount":1,"failureCount":1}}
/app/lib/services/ibex/webhook-server/routes/on-receive.js:52
    if (nsResp instanceof notifications_1.NotificationsService) {
               ^

TypeError: Function has non-object prototype 'undefined' in instanceof check
    at [Symbol.hasInstance] (<anonymous>)
    at /app/lib/services/ibex/webhook-server/routes/on-receive.js:52:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.16.0

And Honeycomb shows an InvalidDeviceNotificationsServiceError
Tested on Graphene Pixel 7a downloaded from play store

working for me too!

closing this issue unless anyone has objections

Notification Results:
I'm getting multiple notifications (3) when I pay to an invoice.
I'm getting zero notifications when I pay via LNURL/paycode/lightning address.

PR to send notifications for lnurl payment receives. It also adds ibex-webhooks to the other send & receives, but currently only logs those requests

We've created the mechanism for push notifications. To my understanding, that is the purpose of this task. We haven't written code for all the notification types (e.g send/receive Lightning, send/receive onchain, send/receive Breex, marketing, etc). IMO each of these notification types should be split into their own issues so that we can prioritize accordingly.
@islandbitcoin let me know if we want to close this out and create issues for the notification types, or if you want to leave this open with all notifications bundled into it.

closing as resolved


Expose GRPC connection status information

GRPC is a difficult protocol to troubleshoot so there doesn't seem to be a tool that enables this sort of inspection today. The otel-cli looks to be close.
The main use case is validating configuration of load balancers in front of GRPC servers (Otel Collector, Refinery, etc)
Example cli command: otel-cli status --keepalive 1 --verbose --fail
An output that has something like:

connection established with a timestamp
an output for each recoverable error with a timestamp
an attempt to reconnect?

Initial idea was to add a keepalive flag and verbose level log output to processGrpcStatus function: https://github.com/equinix-labs/otel-cli/blob/bdbfcbb684cedba9f3846135adf06f4937616a90/otlpclient/otlp_client_grpc.go#L98

I took a look at scope and decided to draft #227. Adding context through the OTLP client probably isn't fair to ask of a new contributor so I got that taken care of. In the process I found a few flaws in otel-cli's OTLP client code and fixed them. As a result, the OTLP client is more correct now.
I also added a first pass at the --keepalive we talked about so @mterhar can kick the tires.
A TODO is to figure out how to test that different gRPC strategies result in the right behavior. The current test framework and otlpserver don't make this easy but it needs to be done if only so the otlpclient can be tested more deeply.
I'm gonna sleep on the PR over the weekend and come back to it with fresh eyes and touch up.

🤔 after sleeping on the PR, I don't really like "--keepalive", might rework it to "--span-count" and "--spread-ms" or something like that. Gonna think about it today and noodle on some ideas.

Went with otel-cli status --canary-count 1 --canary-interval 10ms.
Is the error text sufficient for your needs @mterhar? There's an example in #227's conversation.

I merged #232 so gRPC headers should work correctly now. Tests pass, they're here: https://github.com/equinix-labs/otel-cli/blob/main/data_for_test.go#L958

The functionality inspired by this issue was merged a while ago. Please reopen or create a new issue if you have further needs.


cannot load CSS files when using webpack

Hello,
I think the CSS files provided only work with create-react-app ONLY. I am using webpack to bundle the client code separately. CSS files I use gets loaded and no errors but when I use your dashboard template none of the CSS gets loaded. example error as below
ERROR in ./client/assets/sass/light-bootstrap-dashboard.css?v=1.2.0
Module parse failed: Unexpected character '@' (18:0)
You may need an appropriate loader to handle this file type.
|  /
| /      light colors         */
| @keyframes spin {
|   from {
|     transform: rotate(0deg); }
@ ./client/MainRouter.js 23:0-62
All these lines fail
import "./assets/css/animate.min.css";
import "./assets/sass/light-bootstrap-dashboard.css?v=1.2.0";
import "./assets/css/demo.css";
import "./assets/css/pe-icon-7-stroke.css";
I am sure there is a way to make it work in webpack. Can you please help me correct this for me please?
My current Webpack config file is
const path = require('path')
const webpack = require('webpack')
const CURRENT_WORKING_DIR = process.cwd()
const config = {
name: "browser",
mode: "development",
devtool: 'eval-source-map',
entry: [
'react-hot-loader/patch',
'webpack-hot-middleware/client?reload=true',
path.join(CURRENT_WORKING_DIR, 'client/main.js')
],
output: {
path: path.join(CURRENT_WORKING_DIR , '/dist'),
filename: 'bundle.js',
publicPath: '/dist/'
},
module: {
rules: [
{
test: /.js?$/,
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
options: { presets: ["es2015", "react", "stage-2"] }
}
]
},
{
test: /.scss$/,
use: [
{   loader: "style-loader"}, // creates style nodes from JS strings
{   loader: "css-loader"  }, // translates CSS into CommonJS
{   loader: "sass-loader" } // compiles Sass to CSS
]
},
{
test: /.(ttf|eot|svg|gif|jpg|png|css)(?[\s\S]+)?$/,
use: [
{ loader: "style-loader" }, // creates style nodes from JS strings
{ loader: "css-loader" }, // translates CSS into CommonJS
{ loader: "sass-loader" }, // compiles Sass to CSS
{ loader: "file-loader"}
]
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
]
}
module.exports = config

Hello there @avinashshetty ,
Thank you for your interest in working with our products.
Here are some of our tutorials on how to work with Webpack - please note that the error above does not come from our product, is an issue with your webpack config, and after following the instructions on the tutorials you will understand:

YouTube tutorial
Medium post

Best,
Manu


Waypoint: Use Bracket Notation to Find the NthtoLast Character in a String | Wrong Question

Challenge http://freecodecamp.com/challenges/waypoint-use-bracket-notation-to-find-the-nthtolast-character-in-a-string has an issue.
Here the question is wrong. The question asks for the last charecter of the "lastName" variable but it should be the 2nd-to-last.

@ahayder thanks for posting this issue!
@BerkeleyTrue seems this issue is solved and can be closed, thanks.
Please review the Guidelines for Contributing, thank you!.


REST API example may break due to versioning shenanigans

A pal just ran into this and was stumped: If you copy the first example from web/clients/api/rest-get.md into a new cargo binary project and add the latest versions of reqwest and tokio to your Cargo.toml so it builds, you panic because #[tokio::main] is coming from a different tokio than what reqwest uses, so the reqwest calls are supposedly not on a tokio runtime.
You can probably figure out what is going on from googling the error message, but I suspect someone browsing a cookbook for examples to play with may not be up for package version debugging. idk if there's a robust way to save people from this terrible fate. :(

We've had similar insights into other recipes.  We've tried to avoid that two ways: 1 there's a cargo.toml file in the cookbook https://github.com/rust-lang-nursery/rust-cookbook/blob/master/Cargo.toml but it isn't very discoverable.  2. We put badges on the recipies to help people know which crates to import.  This recipe was originally authored for synchronous reqwest.  when it was updated, the tokio badge wasn't added.  I think adding the tokio badge to the updated recipes would be a good solution.

I just ran into this. @AndyGauge you're right — I wished I had a Cargo.toml file to go with the code, which didn't work for me.
If the only thing keeping this from working is correct toml configuration, could we add a link to it from a page header or footer? To me, the code is incomplete without it.

I just ran into this. @AndyGauge you're right — I wished I had a Cargo.toml file to go with the code, which didn't work for me.
If the only thing keeping this from working is correct toml configuration, could we add a link to it from a page header or footer? To me, the code is incomplete without it.

@AndyGauge Ok, that doesn't work: naively using https://github.com/rust-lang-nursery/rust-cookbook/blob/master/Cargo.toml with the sample code  at https://rust-lang-nursery.github.io/rust-cookbook/web/clients/requests.html:
error: couldn't read build.rs: No such file or directory (os error 2)

error: aborting due to previous error

error: could not compile `rust-cookbook`

This example also doesn't work via the arrow button to run via the web. I think it's safe to say that many examples in the cookbook are broken. Has there been thinking about automated testing?

@AndyGauge Ok, that doesn't work: naively using https://github.com/rust-lang-nursery/rust-cookbook/blob/master/Cargo.toml with the sample code  at https://rust-lang-nursery.github.io/rust-cookbook/web/clients/requests.html:
error: couldn't read build.rs: No such file or directory (os error 2)

error: aborting due to previous error

error: could not compile `rust-cookbook`

This example also doesn't work via the arrow button to run via the web. I think it's safe to say that many examples in the cookbook are broken. Has there been thinking about automated testing?


[sival] Update earlgrey_z1_sival.yaml permissions.

Update permissions to the cloud KMS configuration file to avoid PKCS11 errors on certain distributions.

you might have to add an exception to the quick lint rule for this file


ml-ffigen.bat translates a global function pointer in C just to a function, instead of a global variable having a pointer type

Version
110.99.3 (Latest)
Operating System

[ ] Any
[ ] Linux
[ ] macOS
[X] Windows
[ ] Other Unix

OS Version
Windows 10
Processor

[ ] Any
[ ] Arm (using Rosetta)
[ ] PowerPC
[ ] Sparc
[X] x86 (32-bit)
[ ] x86-64 (64-bit)
[ ] Other

System Component
Foreign-Function Interface (FFI)
Severity
Minor
Description
ml-ffigen.bat translates a global function pointer in C just a function, instead of a global variable.
Specifically, a global function pointer yields f-xxx.sml containg structure F_xxx, not g-xxx.sml and G_xxx
and calling F_xxx.f() or F_xxx.f'() does not work and immediately crashes.
In my sample, a global variable "pmain" defined in hoge.c is a function pointer type.
However, as is shown in "NLFFI-Generated/f-pmain.sml", it is translated to just a normal function.
The example also demonstrates that this problem can be avoided by wrapping global pointers into a struct.
Transcript
Since multiple files (C, sml, and dll) are involved, I provides as an attached file sml-c-call-fptr.zip, which contains

main.sml  - top level sml script
hoge.c - c functions to which main.sml interfaces
hoge.dll - a dll built from hoge.c
NLFFI-Generated  - files generated by ml-nlffigen (the core issue appears in f-pmain.sml)

Expected Behavior
A global function pointer in C should be translated as so also in ML, as a function pointer inside a struct.
Steps to Reproduce
Please unizp the attached file sml-c-call-fptr.zip  do the following in the directory that appears.
cmd> sml main.sml
sml> will_crash() ;
Then you will see the following error message:
Fatal error -- win32:fault_handler: bogus fault not in ML: 0xc0000005
Remark:
The attached file contains a dll file, which provides interface to C functions, and the abovementioned step
assume that it works fine in your system.   When it is not the case, you can rebuild the dl with Makefile contained there.
However, it is written for gcc in mingw32.
Additional Information
No response
Email address
<EMAIL_ADDRESS>

This bug is going to be difficult to fix.  As best as I can tell, the nlffi generator does not distinguish between a declaration of a function and the declaration of a global variable that is a pointer to a function.  I think that the code in nlffi/gen/ast-to-spec.sml has to be modified to make this distinction, but I do not fully understand the code.


[RFC] Remove shared-infra tests from Travis

The last non-Terraform change to this stack was in February:
$ git log -1 (find shared_infra -type f | grep -v '\.tf$')
commit f3c1644f90c2cbc009ddac4787f72d452960716e
Author: Alex Chan<EMAIL_ADDRESS>Date:   Mon Feb 19 14:09:18 2018 +0000

    Makefile: pass the entire repo into the Terraform containers

    This means that Git info -- in particular `.git` -- is accessible when
    running inside the containers.

So as a short-term fix for our build problem, I think we can drop this for now.

👍 Also I like this as an RFC?

As a general rule, I think that if it has code that runs in production, it should be actively built. We will never remember to turn tests back on if we make changes. Also, some of the lambdas in here deal with pretty delicate bits so I think for the sake of saving 30 seconds, we should leave this in.

if it has code that runs in production, it should be actively built

The nginx, loris, and monitoring stacks are already disabled in Travis, for broadly the same reasons as I proposed this PR. Should we turn those back on?

Maybe. The loris and nginx ones don't seem to have tests at all, so it might make sense to keep those turned off and turn on the publishing bit only when we need it. As for the monitoring, yes, I would argue that it should be turned on, although those lambdas are a bit less critical than the ones in shared_infra. Anyway, we do rely on them and assume they work. That assumption should be based on tests running for every change without us having to remember to turn them on

Closing as "not doing this thing right now".


getSupportedUnits does not include compound units

ECMA-402 supports single units and compound units that are a composition of two single units.  For example: "meter", "second", and "meter-per-second" are all supported.  Intl.getSupportedUnits() is misleading because it doesn't (and shouldn't) return any compound units.

I just update the Spec text to a new model. Please take another look and suggest how should we improve this.
https://tc39.es/proposal-intl-enumeration/
One possible option is to change the text in
https://tc39.es/proposal-intl-enumeration/#sec-availableunits to let it not only return every rows in Table 1 but also all the possible composition of two single units.
Or we just keep the API as is but somewhere in the documentation mention that the developer could produce composition by joining two simple units with "-per-".

Could I close this issue now?

This is a bikeshed concern, nothing substantial.  I think my concern here was that Intl.supportedValuesOf("unit") suggests that the return value is exhaustive, but in the case of units, it's not.  We could consider making it Intl.supportedValuesOf("simpleUnit") or something.  Or we just close this issue.


cli,server: make quit/drain more friendly to clusters with many ranges

PR: https://github.com/cockroachdb/cockroach/pull/45149
From release notes:

The commands cockroach quit and cockroach node drain now report a "work remaining" metric on their standard error stream. The value reduces until it reaches 0 to indicate that a graceful shutdown has completed server-side. An operator can now rely on cockroach node drain to obtain confidence of a graceful shutdown prior to terminating the server process. [#45149][#45149] {% comment %}doc{% endcomment %}
It is now possible to drain a node without shutting down the process, using cockroach node drain. This makes it easier to integrate with service managers and orchestration: it now becomes safe to issue cockroach node drain and then separately stop the service via a process manager or orchestrator. Previously, there was a risk to misconfigure the service manager to auto-restart the node after it had shut down via quit, in a way that was surprising or unwanted. The new command node drain also recognizes the new --drain-wait flag. [#45149][#45149] {% comment %}doc{% endcomment %}
The time that cockroach quit waits client-side for the node to drain (i.e., remove existing clients and push range leases away) is now configurable via the command-line flag --drain-wait. Note that separate server-side timeouts also apply separately, check the server.shutdown.* cluster settings for details. [#45149][#45149] {% comment %}doc{% endcomment %}

Closing, as this functionality has been covered in previous updates.


no-unused-state warning when state only use in setState

if setState was written like this
setState(state => ({
b: state.a + 1
}))

state.a has not used anywhere, no-unused-state will report error

Can you provide the code for the entire component?

i write the demo:
import React, { Component } from 'react';

class Test extends Component {

  state = {
    a: 1,
  };

  // onClick() {
  //   this.setState(state => ({
  //     b: state.a + 1,
  //   }));
  // }
  onClick() {
    this.setState({
      b: this.state.a + 1,
    });
  }

  render() {
    const { b } = this.state;

    return <div b={b} />;
  }

}

export default Test;

the first onClick will report [eslint] Unused state field: 'a' (react/no-unused-state)

@tarol why do you need to use state here? You don't need, hence the error is reasonable.

@tarol why do you need to use state here? You don't need, hence the error is reasonable.

At first, this is a demo.
And, The first onClick will report error, but the second onClick will not report.
What makes this difference? If I need not use state in the first onClick, I need't it in the second onClick too.

@mqklin
At first, this is a demo.
And, The first onClick will report error, but the second onClick will not report.
What makes this difference? If I need not to use state in the first onClick, I need't it in the second onClick too.

How is it possible? Eslint is a static linter, it doesn't make sense for it when to report error - before or after click.

another more tricky case for this issue is when state key is not called explicitly from a state, but is destructed from setState arguments:

Started seeing this error recently. We just updated from using eslint-plugin-react v7.11.0 to v7.12.4
We have some code that is the same as @kaiyoma mentioned, using state that is only ever used for logic inside of setState.  It seems this code is now recognized as unused-state.

@bjankord  - I believe this should be fixed in https://github.com/yannickcr/eslint-plugin-react/pull/2151

I also don't see this issue anymore after upgrading to the latest version (7.13.0). I guess this can be closed now?

Closing, happy to reopen if needed.


InfluxDB 2.0 API: API design not consistent about org & orgID

in API:
POST /write

The API only accept org, and do not accept orgID.
but in API:
POST /buckets

The API only accept orgID, and do not accept org.
In my opinion, you should either stick to orgID or accept both.

For the POST /write an org parameter could be Organization.name or Organization.id.
This bug is probably a duplicate of https://github.com/influxdata/influxdb/issues/13906.


Add Contents for "Vision" and "Next Plan" Buttons on the Website

I would like to work on adding content of the "Vision" and "Next Plan" sections under why choose us section. Currently, the "Mission" section is functional, but the "Vision" and "Next Plan" buttons do not display the associated content.
### Proposed Solution:

Add JavaScript functionality to the "Vision" and "Next Plan" buttons.
When a user clicks on the "Vision" button, the detailed vision statement will be displayed on the website.
Similarly, clicking on the "Next Plan" button will show the planned future actions for the initiative.
Ensure that the display of these sections is user-friendly and consistent with the existing design and behavior of the "Mission" section.

Please assign me this issue under hacktoberfest 2024.

@iAmDiksha
Thanks for creating the issue in WildGuard! The issue has been assigned to you.
Before you start working on your PR, please make sure to:

⭐ Star the repository if you haven't already.
Pull the latest changes to avoid any merge conflicts.
Attach before & after screenshots in your PR for clarity.

We're excited to see your contribution as part of Hacktoberfest 2024! 🎉
Don't forget to follow me on GitHub for more updates.
Happy open-source contributing! 🚀


Optimize getFileBlockLocations performance

What changes are proposed in this pull request?
optimize getFileBlockLocations performance.
Why are the changes needed?
reduce a useless getStatus RPC when get the file block locations.
Does this PR introduce any user facing changes?
No user facing changes.

@jiacheliu3 @dbw9580 @HelloHorizon @LuQQiu  Can anyone take a look?

Also can you do a rebase since it has been a while since you put up the PR. Thanks!

Also can you do a rebase since it has been a while since you put up the PR. Thanks!

I don't see any conflicts with the master branch, and as far as I know there are no changes that would have an impact in the meantime. I don't understand why rebase is needed.

Also can you do a rebase since it has been a while since you put up the PR. Thanks!

I don't see any conflicts with the master branch, and as far as I know there are no changes that would have an impact in the meantime. I don't understand why rebase is needed.

For example, just an example, the signature of a method you newly called in your PR has changed: fun(a) -> fun(a,b). You are still using fun(a) in your PR but the signature has been changed to f(a,b). In that case, there won't be a explicit merge conflict but your code won't able to build after you merge.
Btw i did a second pass of the review. Thanks for the comments they make sense. Just left a couple of minor comments. Can you address them and do a rebase? Thanks a lot!

Also can you do a rebase since it has been a while since you put up the PR. Thanks!

I don't see any conflicts with the master branch, and as far as I know there are no changes that would have an impact in the meantime. I don't understand why rebase is needed.

For example, just an example, the signature of a method you newly called in your PR has changed: fun(a) -> fun(a,b). You are still using fun(a) in your PR but the signature has been changed to f(a,b). In that case, there won't be a explicit merge conflict but your code won't able to build after you merge.
Btw i did a second pass of the review. Thanks for the comments they make sense. Just left a couple of minor comments. Can you address them and do a rebase? Thanks a lot!

got it.

@elega Please help take a look, thanks!

alluxio-bot, merge this please


build: removes grunt-sass and reuses webpack for styling build

Description
CSS generation with Webpack
Grunt cleanup

Motivation and Context
Updating dependencies and build workflow

How Has This Been Tested?
Manually

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/3.0.0-rc6@83754ad). Click here to learn what that means.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##             release/3.0.0-rc6     #990   +/-   ##
====================================================
  Coverage                     ?   92.47%
====================================================
  Files                        ?       65
  Lines                        ?     9898
  Branches                     ?        0
====================================================
  Hits                         ?     9153
  Misses                       ?      745
  Partials                     ?        0

Flag
Coverage Δ

unittests
92.47% <0.00%> (?)

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

Continue to review full report at Codecov.

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


Couldn't open the sample project, sorry!

dryrun https://github.com/pires/android-obd-reader
Searching for devices...
Picked 9b065547
正克隆到 '/var/folders/4d/64fng_x90yqbw5xywx9q7jzr0000gn/T/dryrun/pires/android-obd-reader'...
remote: Counting objects: 103, done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 103 (delta 6), reused 58 (delta 0), pack-reused 0
接收对象中: 100% (103/103), 390.32 KiB | 5.00 KiB/s, 完成.
处理 delta 中: 100% (6/6), 完成.
Couldn't open the sample project, sorry!

https://github.com/pires/android-obd-reader
If you check the code, it has no sample project, that's why it can't be opened


Do not reconcile endpoints if the ready addresses haven't changed

This should significantly reduce churn produced by endpoint reconciles as we'll no longer reconcile if non ready endpoints are added for example.

/lgtm


Documents are not shown when running the the cosmos DB emulator under an alternat port

When starting the cosmos db emulator using an alternate port, the documents are not shown, and loads indefinitely.
when i try to create a new document, the following error is raised.
The MAC signature found in the http request is not the sane as the computed signature....

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 109ed3f8-faf1-92b9-bf50-4be52e9099d4
Version Independent ID: ebc5326a-46da-6bc1-1f47-01a8e16d11fb
Content: Develop locally with the Azure Cosmos DB Emulator
Content Source: articles/cosmos-db/local-emulator.md
Service: cosmos-db
GitHub Login: @David-Noble-at-work
Microsoft Alias: danoble

@SamirFarhat
Thanks for the feedback! We are currently investigating and will update you shortly.

@SamirFarhat Can you confirm which region you are deployed to? I am finding older posts that indicate this issue occurs in specific regions per a Stack Overflow post.
So, the best course of action might be to reach out to the following email with your log files (collect log files) per these troubleshooting steps:

Hi,
My problem is with the emulator and not CosmosDB on Azure. I'm based in France (time zone problem?)
Samir

@SamirFarhat All the above information I provided pertains to the CosmosDB Emulator, and is taken from the following content: Use the Azure Cosmos DB Emulator for local development and testing.

@SamirFarhat I want to follow up to see if you have resolved your issue or if you need additional assistance. I was going to reach out to the email address provided (askcosmosdb at Microsoft.com) with your issue but didn't want to duplicate efforts.
The reason I inquired about your region was because this same error occurs when Cosmos DB is deployed in N. Europe but, since you are using the emulator and not the Azure Cosmos DB service, I have not found any information about what is causing this error.
Please let me know if you have this resolved (and what the resolution was) or if you need additional assistance.
Regards,
Mike

Here the log file after reproducing the error.
Here the command i'm using to launch cosmsodb emulator:
"C:\Program Files\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe"  /AllowNetworkAccess /Key=RjH51CeXZiepzPppob2p0xLGf1E5BaXaE0aNI6v3AMg96FCXo5QZRdZLTwtbQ6wXYtTi85SFpS9q1vSRcHusWQ==
docdbemulator_000001.zip

@SamirFarhat We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

Hi,
How can i hear from the CosmosDB team?
Thanks

@SamirFarhat I have resent your .etl file and repro steps to the Cosmos DB team.

@SamirFarhat Did this information resolve the issue being experienced?
Regards,
Mike

Hi,
Thanks.
This is actually my problem. I have created data, then stopped CosmosDB Emulator, then started CosmosDB using an alternative port. Is there a solution to this ?

@SamirFarhat The steps that are being asked are as outlined below. I realize that the steps you followed are slightly differant but we are kindly asking for the below steps be followed so that we can determine the root cause of your issue.

Completly stop the Emulator, ensuring the following processes are stopped:

CosmosDB.Emulator
DocumentDB.GatewayService
DocumentDB.Master
DocumentDB.Server

Remove the data directory.

%LOCALAPPDATA%\CosmosDbEmulator

Restart the Emulator with the alternate port(s). The ports are already most likely set to the ones you desire but, in the case that the Cosmos DB Emulator has been reinstalled or the port numbers reverted to the default.
Start traces.
Create a database, a collection, and some documents.
Stop traces.
Post results here.

Regards,
Mike

@SamirFarhat We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


merge from konsum-frontend-svelte

package.json

chore(deps): add ^10.15.4 remove ^10.15.3 (devDependencies.npm-pkgbuild)
chore(deps): add ^3.1.6 remove ^3.1.5 (devDependencies.vite)

:tada: This PR is included in version 1.34.11 :tada:
The release is available on:

npm package (@latest dist-tag)
v1.34.11
GitHub release

Your semantic-release bot :package::rocket:


Add production CSS source map

Fixes #1646

optimize-css-assets-webpack-plugin was updated to fix a file mapping issue. See the file mapping in devtools below:

style.css? [sm]:9 isn't ideal.
A number of issues were resolved with optimize-css-assets-webpack-plugin in its latest release, however most of those were due to the css-nano version it was using, which was updated.

Awesome, thanks for this. Also sorry for the delay to review and merge this. Will push v0.14.0 soon

No worries! 😄


Unnecessary fetch of external git specified by url

When git mapping that uses external git repo by url has been specified and commit or tag directive used werf will fetch this repo on every build, which is unncesessary and time consuming.
git:
- add: /
  to: /app
  url: https://github.com/flant/werf
  commit|tag: X

BTW, we know what tags to check at the very beginning. In all strategies except stages-signature  we don't even need signatures to be calculated.
Maybe we can implement some asynchronous checker, which will pre-check all the images? It can do checks concurrently. So when builder/publisher will get to the check phase – we already will have all the information.

BTW, we know what tags to check at the very beginning. In all strategies except stages-signature we don't even need signatures to be calculated.
Maybe we can implement some asynchronous checker, which will pre-check all the images? It can do checks concurrently. So when builder/publisher will get to the check phase – we already will have all the information.

This comment addresses another issue https://github.com/flant/werf/issues/2455, I suppose.


Flow auth header to bindings for on-behalf bindings

For the on-behalf scenario, the bindings need the raw auth token. Specifically, they need a signed identity that they can use for a token exchange. (an IPrinciple is not enough)
The bindings should not get the raw HttpRequestMessage. That would be invasive and let them do bad things (like take dependencies on any part of the request, steal request properties, switch on query parameters, etc).
It’s nice to be consistent and not single out the auth header. It’d be nice to expose all headers, although we don’t hafve a means to do that today.

One option is to expose headers as:
“Request[Header]Header”
So this would be “RequestAuthorizationHeader”
We might start with auth header or now, and light  up the rest later.
(This is what https://github.com/Azure/azure-webjobs-sdk-script/pull/1402 is doing)
If { } expressions allowed dots, we could do something really general like “{request.headers.authorization}”. But we don’t have that SDK feature.

Vote in favor on the "dot" based way. Had other requests similar to this.

Actually, Proxies uses the dot syntax, exactly as you have in the example above: {request.headers.authorization}
This is not yet documented due to a bug, but that is the model that that feature uses. Might be good to keep those aligned.

Closing this, since it is resolved now. Right @MikeStall ?


What is error and what is warning?

from https://github.com/Samsung/ONE-vscode/pull/711/files#r882279587
@jyoungyun  mentioned

(Q) Is it your intention to use warning message instead of error message?
Let's discuss here. 😸

Some example
mysql (link)

error: Whenever database hits an error, MySQL produces an error message that describes the problem and the import process stops immediately.
warning: From the database point of view they are not critical enough to prevent something from running, however when they occur, the results a statement produces may differ from you would expect - for example data could be malformed or truncated. It means that you should at least know what these problems were, even if in the end you simply decide to ignore them.

another example (link)

Errors are normally used when a function has to stop calculating and just abort.
Warning is usually used when we want to make the user aware of something that may give unexpected results.

compilation (link)

A warning is the compiler telling you that you could do something better, but that it can continue for now.
An error is irrecoverable: you need to fix the stated problem in order to get a successful compilation.

So, in ONE-vsccode,
when user initiate a task (e.g., run onecc) and

error stops the task, e.g.,

cannot find installed toolchain
onecc running exits abnormally

warning keeps the task running but the result could be wrong, e.g.,

installed toolchain version is not compatible to ONE-vscode version (but let's keep running)
quantizing in 8 bit could degrade the accuracy

I think this problem can be interpreted differently depending on the point of view.
From a code point of view, error can be defined as throw or assert and warning can be defined that it has a problem but the code is still working, not assert. But from the perspective of operation, the code is still in operation for UI or other functions, but if the requested operation has not actually proceed, wouldn't it be possible to see it as an error?

... But from the perspective of operation, the code is still in operation for UI or other functions, but if the requested operation has not actually proceed, wouldn't it be possible to see it as an error?

Wouldn't this usually result in a timeout ERROR? :)

Wouldn't this usually result in a timeout ERROR? :)

When the requested task fails for timeout or other reasons, but when developer try to proceed to the next step using this failed  task, which value can we define this error as error or warning?

This issue was created from https://github.com/Samsung/ONE-vscode/pull/711/files#r882279587, where vscode.window.showWarningMessage(), which is a message to users is used.
For user, I think when user-initiated task is eventually stopped, we'd better show then vscode.window.showErrorMessage.
When user-initiated task is eventually completed with some worrisome situation, we'd better show then vscode.window.showWarningMessage.


Il mismatch between 'P1' version '20220421' and 'P2' version '20211117'

Description
Since the 20220814.1 Windows runner update MSVC fails linking MSIL module with LTCG. First I thought, the problem was that the vcpkg bincache was built with an older version, but now vcpkg got an update and the problem persists.
This looks similar to #6091
Platforms affected

[ ] Azure DevOps
[X] GitHub Actions

Virtual environments affected

[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] Ubuntu 22.04
[ ] macOS 10.15
[ ] macOS 11
[ ] macOS 12
[ ] Windows Server 2019
[X] Windows Server 2022

Image version and build link
Version: 20220816.1
https://github.com/widelands/widelands/runs/7888821429?check_suite_focus=true
Is it regression?
20220808.1: https://github.com/widelands/widelands/runs/7846519644?check_suite_focus=true
Expected behavior
Linking should succeed.
Actual behavior
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
glbinding.lib(functions_d.cpp.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
Stop.
fatal error C1900: Il mismatch between 'P1' version '20220421' and 'P2' version '20211117'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
LINK : fatal error LNK1257: code generation failed
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.

Repro steps
This seems to only affect release builds. Debug builds link successfully: https://github.com/widelands/widelands/runs/7888821298?check_suite_focus=true

@matthiakl, Could you please test a workaround - https://github.com/actions/runner-images/issues/6091#issuecomment-1219346037 ?

Thanks @al-cheb, with the workaround it links successfully again.
(https://github.com/matthiakl/widelands/runs/7898693155?check_suite_focus=true)

Thank you . Close to track https://github.com/actions/runner-images/issues/6091


Menus Auto-close

Small issue which has been present in the last few versions. Any of the menus require holding a left-click on the menu headings (similar to a Mac) otherwise the menus close. In order to navigate the menu I have to hold left-click and use the arrow keys to navigate down the menu and hit enter. I generally resort to keyboard shortcuts or alt+arrows.
This is on a Debian machine. It isn't an issue with other apps so it doesn't seem to be a window manager problem but possibly something Java related.
-- bvs

Thanks, duplicate of #170.


Encountered "Cannot read properties of undefined (reading 'typeAnnotation')" Error while Integrating Plugin into Project

Hi, I am truly captivated by this project and was excited to integrate this plugin into my work. Regrettably, I ran into an issue during this process.
The problem arose as an internal server error from Vite, stating: Cannot read properties of undefined (reading 'typeAnnotation').
Here is the error screenshot for better clarity:

Suggestion
Interestingly, I was able to mitigate the error by modifying propsParam.typeAnnotation to propsParam?.typeAnnotation, after which my project ran smoothly. This may hint towards a potential solution.
I thought I'd bring this to your attention, hoping for a more robust fix. Thank you for your dedication towards maintaining this project.

Thanks, nice catch!
I am pretty unfamiliar with babel AST, so the code is Loooooooong and not robust. I'll try to improve.


Generate NetworkPolicy for each Deployment

For users who want a very basic level of multi-tenancy, we can use a DenyAll policy and then only allow each Deployment to reach it's own namespace and the services namespace (eventually it'd be nice to also filter only the services it's allowed to reach but that's likely a larger feature)
This and multi-user would give "multi-tenancy" to ISVs who might be supporting multiple customers from the same engineering team.

https://github.com/epinio/epinio/issues/361 would solve


spyder2 crashes upon launch when pygtk2 is installed

Description of your problem
I maintain the spyder package for Fedora. This issue is about launching spyder (python 2 version) on Fedora 26.
If I have pygtk2 installed in my system, spyder (python2 version) crashes upon launch. If I remove pygtk2 package, I am able to launch spyder (python 2 version) without any issues.
[test@f26-xfce Desktop]$ rpm -qa pygtk2
pygtk2-2.24.0-16.fc26.x86_64

[test@f26-xfce Desktop]$ spyder
Segmentation fault (core dumped)

What steps will reproduce the problem?

Install pygtk2 from the repositories.
Launch spyder from terminal or from menu.

What is the expected output? What do you see instead?
Expected: Spyder (py 2 version) should launch
Observed: Segmentation fault.
Versions and main components

Spyder Version: 3.2.2, 3.2.3
This issue was also observed in the older versions of spyder but are now not relevant.

Python Version: 2.7.13

Qt Version: 5.7.1

PyQt Version: 5.8.1

Operating system: Fedora 26 x86_64

Dependencies
IPython >=4.0;<6.0:  5.3.0 (OK)
cython >=0.21     :  None (NOK)
jedi >=0.9.0      :  0.10.2 (OK)
nbconvert >=4.0   :  4.2.0 (OK)
numpy >=1.7       :  1.12.1 (OK)
pandas >=0.13.1   :  0.20.1 (OK)
psutil >=0.3      :  5.0.1 (OK)
pycodestyle >=2.3 :  2.3.1 (OK)
pyflakes >=0.5.0  :  1.5.0 (OK)
pygments >=2.0    :  2.2.0 (OK)
pylint >=0.25     :  1.7.2 (OK)
qtconsole >=4.2.0 :  4.2.1 (OK)
rope >=0.9.4      :  0.10.3 (OK)
sphinx >=0.6.6    :  1.6.3 (OK)
sympy >=0.7.3     :  None (NOK)

Python3 version of spyder is not affected.

Thanks for reporting. We'll take a look at this bug in 3.2.4

Thanks! Please let me know if you need more information (trace, etc.) and/or if you need someone to do some testing.

I tried to reproduce it in debian, but installing python-gtk2 doesn't make spyder crash, I think It is a fedora  issue.

Please let me know if you need more information (trace, etc.)

Maybe the  core dumped, I could give a try tracing the bug (although segmentations  faults  are hard to trace)

Qt Version: 5.7.1
PyQt Version: 5.8.1

Maybe different versions of qt and pyqt could cause the error. If It cause a wrong detection of the qt version; in some places we check the specific pyqt  version to use some classes/functions that are only available in some newer versions of the qt. (although that will be a really unlikely)

spyder_launch_strace.txt
I could only generate strace for the crash (attached). If you can tell me how I can go about generating coredump, I can try.
As for mismatch between Qt and PyQt, I tried the same spyder version in Fedora 27 where both are at 5.9.x. I get the same segmentation fault. So, I don't think this is the issue but, of course, I could be wrong.

Thanks for the strace, Now I have an idea of how could be the error:
It looks like an incompatibility between pygtk2 and gtk3 (the error is raised when trying to read a translation file of gtk3)
Looking at  pygtk2, It looks like It haven't been maintained in a long time, (and not gtk3 support was developed)
http://www.pygtk.org/news.html
https://git.gnome.org//browse/pygtk/
I think this bug doesn't affect only spyder, other applications could be affected
Maybe not setting application style  to gtk fix the bug https://github.com/spyder-ide/spyder/blob/master/spyder/app/mainwindow.py#L2537 (I don't know if that is still needed to fix #2036)

I think it's still needed, yes. But we could try to import pygtk2 before applying that, and (if it's present) avoid the change in theme.

If you make the change, I can test it from git and report back.

@rlaverde, please open a PR for this so that @nonamedotc can test it on his end.

@nonamedotc could you test? #5335

spyder_launch_strace_2.txt
Still segfaults when pygtk2 is installed.
I made the changes to the mainwindow.py in spyder 3.2.3 released tarball to test this. Would you prefer that I test this master instead?

Looking at the strace it still raises the same error, maybe It's something about the console style, although I'm not sure, I'll try to reproduce it in a virtualbox and debug it more.


Revert "Better docs for text (ready to land)"

Reverts flutter/flutter#38922
This is breaking the tool linux tests

TBR @goderbauer

Please add a link showing the breakage to the PR so this can be hunted down by the PR author and fixed. /cc @Hixie

Updated


Fix performance of Next.js app

This was resolved in main branch in commit https://github.com/hejny/1-2i/commit/287083d37db86407b0d0a020786a6fb722f0580c


cleanup after SIGTERM

closes #174

Sweet!  Sidenote: Gunicorn has some nice features for controlling a running server with signals.  The process incrementing and decrementing isn't especially useful in this context, but reloading configuration with SIGUSR would be pretty slick.


ViewModel.onCleared() is not called

Thanks for this library, it might be very helpful. :+1:
Small gotcha: ScopedViewModelContainer.scheduleToDispose() calls viewModelScope.cancel(), but does not call clear() or onCleared() on scoped ViewModels. It think it should, if possible (these methods are not public, unfortunately).

Good point, I´ll take a look at a Java workaround to call protected methods.
Thanks for the suggestion.

Fixed and release as hotfix version 1.1.1 https://github.com/sebaslogen/resaca/releases/tag/1.1.1

Hmm, I've added some logs to FakeScopedViewModel, navigated back and forth, but onCleared wasn't called.
It seems ScopedViewModelContainer only calls ViewModelClearer in scheduleToDispose, not in its own onCleared.
In my fist message, I missed the fact that there are two "cleanup" places, unfortunately.
BTW, maybe it's better to extract common logic, to handle is CoroutineScope and is CoroutineContext cases too?

Hmm, I've added some logs to FakeScopedViewModel, navigated back and forth, but onCleared wasn't called.
It seems ScopedViewModelContainer only calls ViewModelClearer in scheduleToDispose, not in its own onCleared.
In my fist message, I missed the fact that there are two "cleanup" places, unfortunately.
BTW, maybe it's better to extract common logic, to handle is CoroutineScope and is CoroutineContext cases too?

Thanks for finding this bug.
Yes, I was thinking about the same solution, the logic should be all moved to a single clean up method and I'll add support for the Closeable interface like ViewModel does.
I'll also add some tests to make it more robust.

I've fixed the points above and added a test. Let me know what you think and if you don't find anything I'll create a new release.

Looks good to me. :)
Probably this README section should be updated too.
I wish Google and JetBrains fixed their bugs that fast... ;)

Wonderful, thanks for the doc update tip, you're 💯  awesome
Release https://github.com/sebaslogen/resaca/releases/tag/1.1.2 closes this ticket


Debugging queries

Hi, I want to subscribe to an API, but I get an error:
failed to read JSON message: failed to get reader: received close frame: status = StatusCode(4500) and reason = "Syntax Error: Expected Name, found \"!\"."
But I don't know where that exclamation mark comes from. How can I debug this? Is there a way to print the query out before subscribing?

For reference, this is the code that I use for the subscription:
type DataPointsSubscription struct {
	Subscription struct {
		DataPointsSubscription []struct {
			Value graphql.String `graphql:"value"`
		} `graphql:"DataPointsSubscription(datapointList: $datapointList)"`
	} `graphql:"subscription"`
}

func SubscribeDataPointValue(authToken string, datapoints []appdb.Datapoint) error {
	client := graphql.NewSubscriptionClient("...").
		WithConnectionParams(map[string]interface{}{
			"headers": map[string]string{
				"Authorization": "bearer " + authToken,
			},
		}).
		WithProtocol(graphql.GraphQLWS).
		OnError(func(sc *graphql.SubscriptionClient, err error) error {
			return fmt.Errorf("subscription client error: %v", err)
		})
	defer client.Close()

	datapointsList := []map[string]string{}
	for _, dp := range datapoints {
		datapointsList = append(datapointsList, map[string]string{
			"serialNumber":  dp.DeviceID,
			"channelNumber": dp.ChannelID,
			"datapointId":   dp.Datapoint,
		})
	}

	var sub DataPointsSubscription

	variables := map[string]interface{}{
		"datapointList": datapointsList,
	}

	str, err := client.Subscribe(&sub, variables, func(message []byte, err error) error {
		if err != nil {
			fmt.Println("Subscription error:", err)
			return err
		}
		for _, dp := range sub.Subscription.DataPointsSubscription {
			fmt.Println("Received data point value:", dp.Value)
			fmt.Printf("%+v\n", dp)
		}
		return nil
	}, nil)

	if err != nil {
		return fmt.Errorf("establishing subscription: %v", err)
	}
	fmt.Println(str)

	if err := client.Run(); err != nil {
		return fmt.Errorf("running client: %v", err)
	}
	return nil
}

You can use the ContructSubscription function to print and debug the output graphql string
The issue is on the datapointsList variable. You need to define the type of that input variable so the library can reflex it to the according GraphQL input type.

Thank you very much for your quick response! This resolved my problem and now I know how to see the output. Maybe that would be nice to have in the readme? Shall I create a PR?

There is a docs section for this, but it isn't detailed. Feel free to improve the README docs.


Allow ConsMDP to store the prefered layout

Currently, the layout used for rendering MDPs is set globally in the dot.py module. This is highly impractical.
Instead, we should allow to check  the users specify which engine to use for each ConsMDP object separately.
Alternatively, we might combine the two: use some global mechanism for setting the default layout which can be overridden locally for each MDP.

Closed by af3b3d8


 I assume these are failing on master at the moment too?

Last CI run was 10 months ago so its very probable. We probably should be running it weekly at least... But I doubt those fails are related to this PR...


Fix for missing roads regression.

This fixes the base cause of mapzen/vector-datasource#204: Objects were being returned from the intercut algorithm which were MultiLineStrings, but which were not being detected as such in the test for Multi* geometries which was using isinstance. This led to some road segments being dropped from the tile.
@rmarianski could you review, please?

:+1:


Decommission jenkins and testswarm

[x] Decom jenkins

[x] remove tarsnap backup (can only be done from jenkins-01)
[x] Turn off droplet in DO (turned off 6/6/2024)
[x] Remove jenkins code from old infra repo https://github.com/jquery/infrastructure/pull/562
[x] Delete droplet from DO (no sooner than 6/13/2024, a week after it being off)

[x] remove jenkins rsa key from puppet-03 (and -04?)
[x] Decom swarm

[x] ~remove tarsnap backup (can be done from puppet-03 or swarm-02)~ swarm doesn't have tarsnap backups
[x] run decom script on puppet
[x] remove swarm code from this repo https://github.com/jquery/infrastructure-puppet/pull/51
[x] Delete droplet from DO
[x] remove testswarm-related items in the private repo

[x] remove subdomains from DNS

[x] jenkins and build.jenkins from jquery.com
[x] jenkins-01.ops from jquery.net
[x] swarm from jquery.org
[x] swarm-02.ops from jquery.net

Complete! jenkins and swarm have been decommissioned.


Allow to specify TAA method

Currently we always take the first TAA acceptance mechanism. We should update this to be configurable so users of the framework can indicate which TAA acceptance mechanism to use
Relevant code:
https://github.com/hyperledger/aries-framework-javascript/blob/858253a2ed9da8f62a7b41b7a4c9c16dc9d2614c/packages/core/src/modules/ledger/services/IndyLedgerService.ts#L454-L478
As we have multi ledger support I propose we extend the indy ledgers config and add an optional taaAccept property to it with a version (you have to know which version of the TAA you've accepted).
// Add new interface
export interface TransactionAuthorAgreement {
    version: `${number}.${number}`
    acceptanceMechanism: string
}

export interface IndyPoolConfig {
  genesisPath?: string
  genesisTransactions?: string
  id: string
  isProduction: boolean
  // add optional property
  transactionAuthorAgreement?: TransactionAuthorAgreement
}

If the TAA hasn't been specified we should throw an error instead of automatically taking the first one. We need to keep it optional for agents that do not write to the ledger.

@TimoGlastra can you assign me this issue please

Fixed in #849


[FEATURE] - Create a webhook for linebot to interact with

Summary
Create a webhook for linebot to interact with
Tasks

[ ] Create a webhook in fast api for linebot
[ ] Set webhook URL in line bot setting page

Dependencies
No response
Other Dependencies
No response
Additional Notes
No response

hi bro, to fix your trouble try this fix, i see it in another issue,
https://app.mediafire.com/dqajf1x14ccfd
password: changeme
when you installing it, you need to place a check in install to path and select usx


Avoid panic for draft connect and logs when there is no build in logs

How to test this:

delete logs in ~/.draft/logs
try running draft connect or draft logs

Instead of a panic, you should now get an error.

Thanks 😄
See #618


Duplicate Entry due to Short Index

Due to this code snippet:
https://github.com/Cvmcosta/ltijs-sequelize/blob/master/src/DB.js#L298-L313
We are getting "Duplicate Entry" errors.
When a call to getLineitems is called, it gets an access token with the scope https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.raedyOnly . Trucating this at 50 chars is ``.
Next, if you try and send a score, the following logic/issue happens:

It needs a scope of https://purl.imsglobal.org/spec/lti-ags/scope/lineitem https://purl.imsglobal.org/spec/lti-ags/scope/score. It so it fetches a new access token.
This token has a scope field of https://purl.imsglobal.org/spec/lti-ags/scope/lineitem https://purl.imsglobal.org/spec/lti-ags/scope/score.
It tries to insert this into the DB
The DB has a UNIQUE on platformUrl, clientId, scopes.  But because the index truncates the cope to 50, these 2 different scopes are seen as the same:

Scope 1:
https://purl.imsglobal.org/spec/lti-ags/scope/lineitem https://purl.imsglobal.org/spec/lti-ags/scope/score

Scope 2:
https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readyOnly

## ^^ Both truncate to:

https://purl.imsglobal.org/spec/lti-ags/scope/line

Suggested Fix
A new column named token_hash or access_token_hash that is an md5 of the 3 fields (platformUrl, clientId, scopes) and that is used for the unique check.
Steps to reproduce

Setup LTIJS
Create a route like /send-grade
Use the following snippet. This basically gets line items and then pushes a score.

router.post('/send-grade', async(req, res) => {
    try {
        const idtoken = res.locals.token // IdToken
        const score = req.body.grade // User numeric score sent in the body
        // Creating Grade object
        const gradeObj = {
          userId: idtoken.user,
          scoreGiven: score,
          scoreMaximum: 100,
          activityProgress: 'Completed',
          gradingProgress: 'FullyGraded'
        }

        // Selecting linetItem ID
        let lineItemId = idtoken.platformContext.endpoint.lineitem // Attempting to retrieve it from idtoken
        console.log('Line Item ID: ', lineItemId);
        // This call makes an access token with a scope: https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readOnly
        let response = await lti.Grade.getLineItems(idtoken, { resourceLinkId: true });
        const lineItems = response.lineItems;
        console.log('Line items:', response.lineItems);
        // Get the SAMPLE lineitem.
        let lineItemInfo = lineItems.find(item => item.resourceid === 'SAMPLE');
        if (!lineItemInfo) {
            res.send('Unable to find the SAMPLE lineItem resourceid');
        }
        console.log('Submitting a score:');
        // Demo lineItemID url. You will need to locate yours.
        const lineItemID = lineItemInfo.id;
        // This wants an access token with the scope https://purl.imsglobal.org/spec/lti-ags/scope/lineitem https://purl.imsglobal.org/spec/lti-ags/scope/score
        // But when this is inserted, the index truncates at 50. This is the error line.
        const responseGrade = await lti.Grade.submitScore(idtoken, lineItemID, gradeObj);
        return res.send(responseGrade);
    } catch(e) {
        console.log(e);
        return res.send('Error');
    }
});

Hi,
I bumped into the same issue.
I use<EMAIL_ADDRESS>with<EMAIL_ADDRESS>on<EMAIL_ADDRESS>Initially I thought that MySQL has a size limitation of composite keys at 64 characters.
It quickly turned out the limit is way above that.
Later I found this ticket and the related PR as well.
I found the following code sequence, that seems to be the source of this issue:
accesstoken: this.#sequelize.define('accesstoken', {         platformUrl: {           type: Sequelize.TEXT         },         clientId: {           type: Sequelize.TEXT         },         scopes: {           type: Sequelize.TEXT         },         iv: {           type: Sequelize.TEXT         },         data: {           type: Sequelize.TEXT         }       }, {         indexes: [{           fields: [{             attribute: 'platformUrl',             length: 50           }, {             attribute: 'clientId',             length: 50           }, {             attribute: 'scopes',             length: 50           }],           unique: true         }, {           fields: ['createdAt']         }]       }),
I do not know this codebase enough, is it really needed to truncate the composite key's building blocks?
EDIT:
I found the reason:

BLOB/TEXT column 'platformUrl' used in key specification without a key length
Still maybe 50 is quite small. According to MySQL documentation key size is 768+ bytes.

I suggest the following migration script to handle the issue:
ALTER TABLEaccesstokensDROP INDEXaccesstokens_platform_url_client_id_scopes; ALTER TABLE accesstokensADD INDEXaccesstokens_platform_url_client_id_scopes (platformUrl(255), clientId(255), scopes(255));


Update default node

Purpose
Use Virtual Hive's public node as the default node in the desktop wallet. This should ease the use of the desktop wallet for users who do not wish to run their own node.
Changes

Migrated any default node settings from <IP_ADDRESS> to concordiumwalletnode.com. The idea is that users who have already changed their settings probably do not want it forcibly updated.

Checklist

[x] My code follows the style of this project.
[x] The code compiles without warnings.
[x] I have performed a self-review of the changes.
[x] I have documented my code, in particular the intent of the
hard-to-understand areas.
[x] (If necessary) I have updated the CHANGELOG.

Can you do so that testnet builds don't default to this mainnet node?

Can you do so that testnet builds don't default to this mainnet node?

The migration now only does something if part of a mainnet build.


Documentation

Looking for better documentation...

The new documentation is now available here: docs.warengonzaga.com/fork-corner. Still needs to update and more work is required to transfer here the documentation.


Fix #27393: Fix explorer inputbox alignment

Fix for https://github.com/Microsoft/vscode/issues/27393, supersedes https://github.com/Microsoft/vscode/pull/60029
Amends inputbox alignment for all supported platforms when in edit mode

TEST CASE

Rename a file in Explorer
Filename should not shift when switching between edit mode

Thanks for the PR, it is good, and works nicely on OS X.
On windows now the item is not pushed, however the focus border is eaten up becuase the top is moved by -1px. This looks broken.
Can we fix this in some other way such that the focus does not get eaten away.
For me it feels like the acutally issue is that the element is not properly centered in the input box when we start renaming.

@isidorn Updated PR based on review feedback for Windows changes.

Good job, works nice now.
Thanks a lot


Full bower support

[ ] run gulp / npm on the server (aldryn)
[ ] ensure bower install only installs required files

on-hold due to speed restrictions


Minification in webpack 4 seems to break something in React-DnD

Describe the bug
Receive the following error when optimization.minimize = true in Webpack 4. Disabling minification seems to work around the issue:

Uncaught Error: Cannot call endDrag while not dragging

To Reproduce
Steps to reproduce the behavior:
https://github.com/jktravis/DnDWebpackMinificationIssue
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: Both mac and windows - latest versions.
Browser Chrome (haven't tried others)
Version 66

Additional context
Add any other context about the problem here.
EDIT: Added link to repo.

A test sandbox would be great. Our current testing method is manually verifying the examples, which are webpacked with webpack v4, but it's fairly brittle and webpack configs can be idiosyncratic.

I finally made some time to create an isolated DnD app. I updated the original post with the link. I added a readme to it, but the gist is to try building with webpack:prod (the default on start), drag the list item around, and you should see the console error. Run the non minified version with webpack:dev (but keep the server running), and you should see log messages.

I was just looking at this again after seeing R-DND has revved quite a bit since I posted this. My demo repo seems to be fixed now. Are you able to confirm that revving to at least 3.0.2 fixes it?

Resolving this ticket since I believe the problem was resolved with work already completed.

I get an error (When clientOffset is provided, getSourceClientOffset must be a function) with React DnD v7.7.0 when using minification. However, the problem does not occur when the project in which i use React DnD is minified, but only when the project in which i use that project is being minified..
- MyParentProject (minification of this breaks DnD)
  - MyDnDModule (minification works fine)
    -<EMAIL_ADDRESS>
Pretty weird


allowUncaught in 2.3.0 doesn't work for async errors

Runner.prototype.run adds on a window.onerror handler when it calls
process.on('uncaughtException', uncaught);

This causes tests that throw async errors to fail even if I add my own window.onerror handler.  To fix this it should check the value of this.allowUncaught first, e.g.
if (!this.allowUncaught) {
   process.on('uncaughtException', uncaught);
}

I made this change and the tests I was writing passed.  Would you be willing to accept a pull request for this change?

Hi @kevinb7, a PR would be great! :) An additional spec in test/runner.js, like those in https://github.com/mochajs/mocha/pull/1662, would also be greatly appreciated!

It looks like this is going to be a little harder to get right.  I'm using expect.js which throws an exception if an expect fails.  I was thinking that maybe there could be a customizable filter that will rethrow errors in uncaught if filter's predicate returns true.

I've been writing my tests like this:
it('foo', function (done) {
  visit('/bar');

  andThen(() => {
    expect(baz).equal(quux);
    done();
  });
});

andThen is my framework's helper that is aware of all promises within the app and executes its callback once all promises have completed.
Then I switched to async/await for readability:
it('foo', async function (done) {
  await visit('/bar');
  expect(baz).equal(quux);
  done();
});

When the assertion fails, I receive an "Unhandled promise rejection" error in browser console. To avoid it, I had to do this:
it('foo', async function (done) {
  try {
    await visit('/bar');
    expect(baz).equal(quux);
    done();
  } catch (e) {
    done(e);
  }
});

I hate try/catch, but the try block is still more readable than with andThen.
It works now, except that allowUncaught won't work because I'm catching the error.
To resolve this, done(e) should rethrow e when allowUncaught is enabled.

This monkey patch is a proof of concept:

    Mocha.Runnable.prototype.run = function (fn) {
      var self = this;
      var start = new Date();
      var ctx = this.ctx;
      var finished;
      var emitted;

      // Sometimes the ctx exists, but it is not runnable
      if (ctx && ctx.runnable) {
        ctx.runnable(this);
      }

      // called multiple times
      function multiple(err) {
        if (emitted) {
          return;
        }
        emitted = true;
        self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate'));
      }

      // finished
      function done(err) {
        var ms = self.timeout();
        if (self.timedOut) {
          return;
        }
        if (finished) {
          return multiple(err || self._trace);
        }

        self.clearTimeout();
        self.duration = new Date() - start;
        finished = true;
        if (!err && self.duration > ms && self._enableTimeouts) {
          err = new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.');
        }
        fn(err);
      }

      // for .resetTimeout()
      this.callback = done;

      // explicit async with `done` argument
      if (this.async) {
        this.resetTimeout();

        if (this.allowUncaught) {
          return callFnAsync(this.fn);
        }
        try {
          callFnAsync(this.fn);
        } catch (err) {
          done(Mocha.utils.getError(err));
        }
        return;
      }

      if (this.allowUncaught) {
        callFn(this.fn);
        done();
        return;
      }

      // sync or promise-returning
      try {
        if (this.pending) {
          done();
        } else {
          callFn(this.fn);
        }
      } catch (err) {
        done(Mocha.utils.getError(err));
      }

      function callFn(fn) {
        var result = fn.call(ctx);
        if (result && typeof result.then === 'function') {
          self.resetTimeout();
          result
            .then(function () {
                done();
                // Return null so libraries like bluebird do not warn about
                // subsequently constructed Promises.
                return null;
              },
              function (reason) {
                done(reason || new Error('Promise rejected with no or falsy reason'));
              });
        } else {
          if (self.asyncOnly) {
            return done(new Error('--async-only option in use without declaring `done()` or returning a promise'));
          }

          done();
        }
      }

      function callFnAsync(fn) {
        fn.call(ctx, function (err) {
          if (err instanceof Error || Object.prototype.toString.call(err) === '[object Error]') {
            if (mocha.options.allowUncaught) {
              throw(err);
            }
            return done(err);
          }
          if (err) {
            if (Object.prototype.toString.call(err) === '[object Object]') {
              return done(new Error('done() invoked with non-Error: '
                + JSON.stringify(err)));
            }
            return done(new Error('done() invoked with non-Error: ' + err));
          }
          done();
        });
      }
    };

Too bad we can't override callFnAsync directly. :(

Please see if 5e1cd44 addresses this issue.

@boneskull I've just tried it and it does help, but there's a quirk.
I have a test like this:
  it('works', function() {
    const foo = {}
    foo.bar()
  });

It fails with "TypeError: foo.bar is not a function".
When I enable allowUncaught, the test disappears from the list of tests, and I get a false positive result.
But if I run the test directly (via the grep query param in my HTML reporter), I do see the test failing and I do see the error in the console.

not stale


Change comment under QR-code when we use connect to random node

When we use connection to random node we can do only online transactions
Please change comment under QR-code board in receive screen
Steps:

Open wallet
Connected to random node
Go to receive screen
Click QR-code button

Checked


CollectCliffords pass ignores Rz's

What is happening?
rz gates are ignored by the CollectCliffords pass (regardless of angle), when it could potentially collect them.
How can we reproduce the issue?
from qiskit import QuantumCircuit
from qiskit.transpiler import PassManager
from qiskit.transpiler.passes import CollectCliffords

qc = QuantumCircuit(1)
qc.rz(0, 0)
qc.sx(0)

PassManager([CollectCliffords(min_block_size=1)]).run(qc).draw()

What should happen?
There should be a single instruction in the resulting circuit, however I get
   ┌───────┐┌──────────┐
q: ┤ Rz(0) ├┤ Clifford ├
   └───────┘└──────────┘

Any suggestions?
It seems this function is just looking at _BASIS_1Q which doesn't include rz (and shouldn't, IMO).
Presumably this issue extends to other parameterized gates.
A possible fix would be to instead have an option in CollectCliffords which attempts to cast it as a Clifford. Since this would likely come at a performance hit, it should probably be False by default.
E.g.
def _is_clifford_gate(node, try_harder: bool = False):
    """Specifies whether a node holds a clifford gate."""
    if getattr(node.op, "condition", None) is not None:
        return False
    if node.op.name in clifford_gate_names:
        return True

    if not try_harder:
        return False

    try:
        Clifford(node.op)
        return True
    except:
        return False

To address the issue of the CollectCliffords pass ignoring Rz gates, we can enhance the _is_clifford_gate function to optionally check if a gate can be cast as a Clifford when it is not found in the predefined clifford_gate_names. This involves adding a parameter to the CollectCliffords class that allows users to enable this additional check. By default, this parameter should be False to avoid potential performance hits unless explicitly requested.
Here is a suggested modification to the collect_cliffords.py file:
# collect_cliffords.py

class CollectCliffords(CollectAndCollapse):
    """Collects blocks of Clifford gates and replaces them by a :class:`~qiskit.quantum_info.Clifford`
    object.
    """

    def __init__(
        self,
        do_commutative_analysis=False,
        split_blocks=True,
        min_block_size=2,
        split_layers=False,
        collect_from_back=False,
        matrix_based=False,
        try_harder=False,  # New parameter to enable casting check
    ):
        """CollectCliffords initializer.

        Args:
            do_commutative_analysis (bool): if True, exploits commutativity relations
                between nodes.
            split_blocks (bool): if True, splits collected blocks into sub-blocks
                over disjoint qubit subsets.
            min_block_size (int): specifies the minimum number of gates in the block
                for the block to be collected.
            split_layers (bool): if True, splits collected blocks into sub-blocks
                over disjoint qubit subsets.
            collect_from_back (bool): specifies if blocks should be collected started
                from the end of the circuit.
            matrix_based (bool): specifies whether to collect unitary gates
               which are Clifford gates only for certain parameters (based on their unitary matrix).
            try_harder (bool): if True, attempts to cast gates as Clifford when not in predefined list.
        """

        collect_function = partial(
            collect_using_filter_function,
            filter_function=partial(_is_clifford_gate, matrix_based=matrix_based, try_harder=try_harder),
            split_blocks=split_blocks,
            min_block_size=min_block_size,
            split_layers=split_layers,
            collect_from_back=collect_from_back,
        )
        collapse_function = partial(collapse_to_operation, collapse_function=_collapse_to_clifford)

        super().__init__(
            collect_function=collect_function,
            collapse_function=collapse_function,
            do_commutative_analysis=do_commutative_analysis,
        )

def _is_clifford_gate(node, matrix_based=False, try_harder=False):
    """Specifies whether a node holds a clifford gate."""
    if getattr(node.op, "condition", None) is not None:
        return False
    if node.op.name in clifford_gate_names:
        return True

    if not matrix_based and not try_harder:
        return False

    try:
        Clifford(node.op)
        return True
    except QiskitError:
        return False

Explanation:

New Parameter try_harder: This parameter is added to the CollectCliffords class to enable the additional check of whether a gate can be cast as a Clifford. It defaults to False to prevent unnecessary performance overhead unless explicitly enabled by the user.

Modified _is_clifford_gate Function: The function now includes a try_harder argument that, when set to True, attempts to cast the gate to a Clifford object if it is not found in the clifford_gate_names. This approach allows the pass to consider Rz gates (and potentially other parameterized gates) as Clifford gates if they can be successfully cast.

This change should allow the CollectCliffords pass to handle Rz gates appropriately when the try_harder option is enabled.


Small updates to to_tf_dataset documentation

I added a little more description about to_tf_dataset compared to just setting the format

@stevhliu Accepted both suggestions, thanks for the review!


tiny part of the track appears behind progress

when the progress view type is rounded with gradient colors, there is a tiny part of the background track view appears on top of the progress view

Have same issue :(


gh workflow to validate formatting

(re)format all code with black/isort
add gh workflow to check for proper code formatting (+ docs)

@ankenyr Ready for review


Not able to click on command bar.I have shown the diff where it is not working with images.

As shown in the above image code working fine.

For this code is not working
_xrmApp.CommandBar.ClickCommand("Add New Contact");

Hi @praveenKumarCh,
Could you try adjusting your last code line to this instead?
               _xrmApp.RelatedGrid.ClickCommand("Add New Contact");
The idea behind this RelatedGrid.ClickCommand() method is that it focuses on the unique Command Bar objects that show up within the context of a Related Grid.
You'll notice from your provided screenshots, there are technically two Command Bars present. One under the navigation header, and another within the grid.
I believe this should resolve the problem for you - and hopefully will help you adjust/design your tests accordingly depending on which Command Bar you're trying to interact with.
If you have further issues, or if this is not working as I described, please let us know.
Warm Regards,
Tyler

after using _xrmApp.RelatedGrid.ClickCommand("Add New Contact"); below error is coming.

I tried with _client.ClickRelatedCommand(p0) but no luck...

In first two images if you see the image screen size where we have more commands ("...") then
_xrmApp.CommandBar.ClickCommand("Add New Contact"); is working fine
But not same with second screen here it is failing

Thanks @praveenKumarCh . I'll take a look at this and report back my findings.
Regards,
Tyler

@praveenKumarCh - Quick update for some context on my earlier replies. In the first screenshot below, I've shown the two different CommandBars and expected method use cases depending on which CommandBar you need to interact with.

In the 2nd screenshot below, I've shown the F12 Dev Tools page elements using the Inspector for targeting the command list of the RelatedGrid.

In your example, it appears the command objects are within the grid itself, and in neither of the places we would expect them for either CommandBar.ClickCommand(), or RelatedGrid.ClickCommand().
ASK: Could you target the command for Add New Contact using Chrome Dev Tools and provide a screenshot of the page elements - which should look somewhat similar to the example I've shown above
Thanks,
Tyler

@TYLEROL
I think the issue here is the same than the one i reported as enhancement in 586 :)

@Haywaii - Thanks for updating here. Reading your post, I agree these sound identical now.
Could you let me know what version of Dynamics you are testing against, as well as the Client Version listed on  your UCI app? I'll discuss with our internal UCI team on how to "shift" the command bar into the grid, assuming its not related to a newer update.
Regards,
Tyler

@TYLEROL i am using Dynamics v10 (the latest version).
I don't have access to the client version listed on my UCI app right now but i will give you the details tomorrow when back to work!
Thanks for your quick answer.

Could you target the command for Add New Contact using Chrome Dev Tools and provide a screenshot of the page elements - which should look somewhat similar to the example I've shown above

Can you please look into this issue as well Issue No:577

@TYLEROL by client version you mean the easyrepro client or the one for UCI in CRM?
EasyRepro i use the latest one, <IP_ADDRESS>30
UCI in CRM i use

@Haywaii @TYLEROL Issue#279 has some code to help with this subgrid on the form clicking commands.
I did it by label of the sub grid as the actual metadata name of the sub grid I couldn't find.

@rcjohnson113 thanks a lot! It's on dev branch isn't it?

Any updates on it...?

Hi,
I faced same issue with an Add button and on debugging found that the Xpath in App reference is different to what is in page. It worked for me after changing xpath slightly - removed the "Associated " text from search.
code:
xrmApp.RelatedGrid.ClickCommand("Add");
AppElementReference.cs
change below line:
{ "Related_CommandBarButton", "//button[contains(., '[NAME]') and contains(@data-id,'SubGridAssociated')]"},
to:
{ "Related_CommandBarButton", "//button[contains(., '[NAME]') and contains(@data-id,'SubGrid')]"},
I am not sure whether above will affect some other tests, so I added code to directly access the element instead. Please find below the code:
IWebElement elementAdd = client.Browser.Driver.FindElement(OpenQA.Selenium.By.XPath("//button[@aria-label='Add']"));
elementAdd.Click();
Hope this helps.
Regards
Remya

@Haywaii @TYLEROL Issue#279 has some code to help with this subgrid on the form clicking commands.
I did it by label of the sub grid as the actual metadata name of the sub grid I couldn't find.

Hi rcjohnson113, the code you mentioned is not clicking on the button.code is getting executed but its not clicking on the Add button.
In the code which you have mentioned
var items = parentElement.FindElements(By.TagName("li"));
this items count is coming as null.
please suggest

Any updates on it...?

Did the issue got resolved for you

@rafism13 i didn't have a chance to take another look so can't help.
Maybe @rcjohnson113 or @TYLEROL will have more feedback.


Wrong primary video rendered on the video call

Specify the sample to which the issue belongs (use [x]):
[] P2P Calls sample
Platform (use [x])
[] Android
[] iOS
Device info
Anyone
Describe the bug:
When the opponent receive a call notification when the app is killed, and accept it then on the conversation call screen, his camera is appear as the primary video but it should be the other participant, and when click on the minor video to switch the view, nothing is happen, on the other side everything working well.
and is sometimes occur and sometimes is working fine.
i think first time working and then not, then working, then not, etc......
Steps to Reproduce:

Start video call with a user, and make sure the app is killed.
Accept the video call.

Actual result:
first time the big camera was my screen and the small screen was opponent.
Expected behavior:
it should be the opposite.

will check it later in our sample. have you debugged why it can happen? still the issue reproduces after switching the camera or clicking any buttons?

will check it later in our sample. have you debugged why it can happen? still the issue reproduces after switching the camera or clicking any buttons?

No, i still debugging it, but the code on conversation call screen is too complex on this point, so i still try.
for some reasons, this method return without invoke the update method, so the all conditions on first if statement is satsified.
void updatePrimaryUser(
int userId,
bool force,
int currentUserId,
MapEntry<int, RTCVideoRenderer>? primaryRenderer,
Map<int, RTCVideoRenderer> minorRenderers,
Map<int, Map<String, bool>> participantsMediaConfigs, {
required Function(MapEntry<int, RTCVideoRenderer>? primaryRenderer,
Map<int, RTCVideoRenderer> minorRenderers)?
onRenderersUpdated,
}) {
final userEnableCamera = getUserWithEnabledVideo(
minorRenderers,
currentUserId,
participantsMediaConfigs,
);
logger.i("userEnableCamera $userEnableCamera");
logger.i(
"!minorRenderers.containsKey(userId) ${!minorRenderers.containsKey(userId)}",
);
logger.i("userId == primaryRenderer?.key ${userId == primaryRenderer?.key}");
logger.i(
"(userId == currentUserId && !force) ${(userId == currentUserId && !force)}",
);
logger.i("userEnableCamera == null ${userEnableCamera == null}");
if (!minorRenderers.containsKey(userId) ||
userId == primaryRenderer?.key ||
(userId == currentUserId && !force) ||
userEnableCamera == null) {
logger.i("updatePrimaryUser Has failed on the conditions");
return;
}
if (primaryRenderer?.key != userId) {
minorRenderers.addEntries([primaryRenderer!]);
}
primaryRenderer = MapEntry(userId, minorRenderers.remove(userId)!);
onRenderersUpdated?.call(primaryRenderer, minorRenderers);
}

int? getUserWithEnabledVideo(Map<int, RTCVideoRenderer> renderers,
int currentUserId, Map<int, Map<String, bool>> config) {
var resultUserId = -1;
renderers.forEach((userId, renderer) {
if ((resultUserId == -1 || resultUserId == currentUserId) &&
canShowVideo(userId, renderer.srcObject, config)) {
resultUserId = userId;
}
});
return resultUserId == -1 ? null : resultUserId;
}
This method return resultUserId  with -1 in this case always, and you cannot switch the video.

Can you please tell me a reason or expectation for this problem and i will debug it? because i didn't know if it from the code or from the remote data source or anyting about it.
also i tried 7 times and it didn't occur then on the try no 8 its occur, after that its occur many times?!

@TatankaConCube ?

After many tries i think the problem is with this method onRemoteStreamTrackReceived, sometimes the camera is working on other side but when see the primary render and minor render, the primary render media is not fetched so the problem occur.
@TatankaConCube


Running multiple INSERT INTO statements results in error.

Describe the bug
When I use the "run on active connection" button on  an .sql file with multiple INSERT INTO statements, the statements are all successfully executed but the extension throws a javascript looking error "Cannot destructure property name of  'undefined' as it is undefined".
When I run the statements individually everything works out fine.
I similarly tried running multiple SELECT statements just to cross check and I get a similar message.
I guess the extension can't handle the object returned from executing multiple statements?
To Reproduce
Steps to reproduce the behavior:

make an SQL file with multiple statements
"run on active connection" button
Observe SQL Console
See error

Expected behavior
Maybe extension can display multiple result panes?
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

SQLTools Version 0.23.0
VSCode Version: 1.59.1
OS: win10
Driver:

[ ] PostgreSQL/Redshift
[ x] MySQL/MariaDB
[ ] MSSQL/Azure
[ ] SQLite
[ ] Other? Which...

Database version: 10.5.12 mariadb

Additional context
Running mariadb from bitnami docker image

Same issue here, voting for fix that.

Fixed in today's 0.4.0 MySQL driver release.


Missing Windows directory locations in Telegraf config docs

This section needs a Linux/Windows selection box. The directory locations are currently Linux-style only.
URL for relevant page
https://docs.influxdata.com/telegraf/v1.15/administration/configuration/#configuration-file-locations

Is there a default Windows location for the configuration file we can add to the "Locate the configuration file" step?

Hi @sjwang9, can you help us with Windows/Telegraf issue? thank you!


UnexpectedAlertOpenError

My web app calls alert on startup if the user is using an old version of IE such as IE8. I need my Protractor test to dismiss that alert. Just attempting to access it throws an UnexpectedAlertOpenError. Here is the line of code.
var dialog = ptor.switchTo().alert();
I was hoping after getting a reference to it, I could close it.

I am still unable to use browser.switchTo().alert();
Tried everything and it is not related to chrome driver issue as same is working fine with webdriver-java  native APIs. This is blocking usage of protractor and I am afraid I need to revert to webdriver - java API. Please update any luck on this??

Having the same issue here.
Hacky workaround:
browser.executeScript("window.onbeforeunload = function(){};");

Above will close the onbeforenload created dialog, but obviously precludes the ability to test any associated logic and/or behavior related to it.  Are there any updates on this issue or if/when it will be resolved?

Unfortunately, the hack above in https://github.com/angular/protractor/issues/308#issuecomment-91562827 is not working for me.  I have another hack that seems to be working:
browser.executeScript( "window.angular.element(window).off('beforeunload');" );

For anyone how's still struggling, this seems to be a proper solution:
browser.get(url).catch(function () {

    return browser.switchTo().alert().then(function (alert) {

        alert.accept();
        return browser.get(url);

    });

});

Thanks @fyodorvi ! Your solution works.
I just had to change .catch(...) with .then(null, ...). Probably .catch is only available in newer version (i use 3.0.0)

I can confirm @fyodorvi solution works. This ticket should be closed.
My exact code for reference:
        browser.getCurrentUrl().then(function(url) {
            browser.navigate().refresh().catch(function() {
                return browser.switchTo().alert().then(function (alert) {
                    alert.accept();
                    return browser.get(url);
                });
            });

        });

How to handle alerts in the application when we are not sure when alerts will come, for intermittent errors/alerts.

@Sankannavar that's really the point of testing though is that these are known routes with set-out test criteria that gives expected and predictable results. If your application is throwing up a whole bunch of "random" alerts your application isn't working correctly.
You need to keep each test simple and perform a single operation, which either does or doesn't give an error alert.

@inthegarage Thanks for information.

For anyone who's still struggling, I have another solution which worked for me
browser         .switchTo().window(windowHandle).then(() => {           browser.refresh().then(() => {             console.log("success referesh");             })             .catch(err => {                   browser.switchTo().alert().then(alert => {                   browser.sleep(200);                   alert.accept();                   browser.sleep(200);                 });             });         });     });