CancelAnimationFrame not defined, causes issues with react-native and rxjs

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
If you have a test that looks like this:
import 'react-native';
import rx from 'rxjs'; // <-- The important line! In a real app, this would likely happen within the module that's being tested.
import React from 'react';
import Index from '../index.android.js';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
  const tree = renderer.create(
    <Index />
  );
});

Running it will throw this error:
TypeError: Cannot read property 'bind' of undefined

at new RequestAnimationFrameDefinition (node_modules/rxjs/util/AnimationFrame.js:6:66)
at Object.<anonymous> (node_modules/rxjs/util/AnimationFrame.js:33:26)
at Object.<anonymous> (node_modules/rxjs/scheduler/AnimationFrameAction.js:8:24)
at Object.<anonymous> (node_modules/rxjs/scheduler/animationFrame.js:2:30)

Which leads to this section in rxjs:
    function RequestAnimationFrameDefinition(root) {
        if (root.requestAnimationFrame) {
            this.cancelAnimationFrame = root.cancelAnimationFrame.bind(root); //<-- fails
            this.requestAnimationFrame = root.requestAnimationFrame.bind(root);
        }

As far as I can tell, this throws an error because after importing 'react-native global.requestAnimationFrame is defined, but global.cancelAnimationFrame is not, so it enters that block and blows up. I have created an issue in the rxjs repo about checking for both, but it seems their assumption is that both should be defined if requestAnimationFrame is.
I wasn't quite sure where to report this, but I chose to do it here because it's not an issue while running a react-native app, it's only when I'm importing react-native in a jest test that the error happens. Also, this issue was not present in jest 16, but that had some other problems.
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
Minimal example repo. You can see the error by running npm test.
What is the expected behavior?
Not sure what would be best, but ideally the tests would run without needing a workaround.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
This was reproducible with a fresh react-native project with the following specs:
jest config:  "jest": { "preset": "react-native" }
jest version: 18.1.0 (also present in at least one version of 17)
node version: 7.2.1 (also present with 5.5.0)
yarn version: 0.18.1
os: macOS 10.12.1
rn version: 0.40.0 (also present with 0.38.0)
rxjs version: 5.0.3 (also present with 5.0.0-rc.1)
This config can be seen in my repro repo.
Workaround
If anyone else is running into this, I've found two (related) workarounds.
The first is to simply require rxjs before react-native in individual tests:
import 'rxjs'; // <-- importing this here works!
import 'react-native';
import React from 'react';
import Index from '../index.android.js';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
  const tree = renderer.create(
    <Index />
  );
});

For a more general solution, you can use setupTestFrameworkScriptFile to require a file that looks like this:
// <your setupTestFrameworkScriptFile>.js
import 'rxjs';

Both of these appear to work because the rAF check only seems to get run the first time you import rxjs, and requestAnimationFrame doesn't get added to global until react-native is first imported. So, importing rxjs first prevents later imports from getting into the bad if block.

Thanks for the detailed description. I think what makes the most sense is to add cancelAnimationFrame to react-native. If it is present in the real environment but not in the tests, put it in https://github.com/facebook/react-native/blob/master/jest/setup.js – I'm a bit confused as to why requestAnimationFrame would be available in Jest but not cancelAnimationFrame. Can you find out where it comes from?
(Closing this issue but happy to discuss to resolve it. Feel free to open the same one for RN, though)

Hey @cpojer, thanks for getting back on this. I did some digging into this and found some behavior that looked a little strange, and I was wondering if you may be able to provide any insight.
What I've found is that requestAnimationFrame and cancelAnimationFrame are both defined in in JSTimers. Then, they're both supposed to be added to global in initializeCore. That looks like this:
const defineLazyTimer = name => {
  defineProperty(global, name, () => require('JSTimers')[name]);
};
// ... other timers
defineLazyTimer('requestAnimationFrame');
defineLazyTimer('cancelAnimationFrame');
// ... other timers

So, everytime we import react-native in a jest test, this code runs, seemingly adding all of those functions to global. However, the first time that anonymous function runs, require('JSTimers') is returning an empty object, so rAF and cAF are both undefined, so both global.requestAnimationFrame and global.cancelAnimationFrame get set to undefined.
It gets a little weirder though. defineProperty, in this case, calls defineLazyObjectProperty, which defines a getter and a setter:
  function getValue(): T {
    // WORKAROUND: A weird infinite loop occurs where calling `getValue` calls
    // `setValue` which calls `Object.defineProperty` which somehow triggers
    // `getValue` again. Adding `valueSet` breaks this loop.
    if (!valueSet) {
      setValue(get());
    }
    return value;
  }
  function setValue(newValue: T): void {
    value = newValue;
    valueSet = true;
    Object.defineProperty(object, name, {
      value: newValue,
      configurable: true,
      enumerable,
      writable,
    });
  }

Here is where the two diverge.
cAF enters getValue, grabs undefined from the require in the callback, passes that setValue, and returns undefined.
It was a bit harder to follow the behavior for rAF. But as far as I can tell, first we enter getValue, which enters the callback. Something within require('JSTimers') sends us back into getValue, and when that calls require('JSTimers')[name], it gets undefined, which gets set to global. However, we then return to the top layer, where require('JSTimers')[name] has returned the correct function, and global is updated accordingly.
Hence, global.rAF has a value, whereas global.cAf does not. This is probably a lot easier to see in the debugger, but basically, the require seems to be causing getValue to recurse once. On the other hand, when we run the react-native app, both are after returned from require('JSTimers')[name], and there is no recursion for rAF. So it seems like the root cause has to do with differences between Jest's packager and react-native's, though I could be totally off on that.
This got pretty wordy, sorry about that. I can look into require some more, but do you have any thoughts on why it might be returning an empty object on the first pass, or why it's behaving differently for cAF and rAF?

I've managed to create a smaller example. In this branch of my repro repo It looks like this:
const defineLazyObjectProperty = require('defineLazyObjectProperty');
const defineLazyTimer = name => {
  defineLazyObjectProperty(global, name, {
    get: () => require('JSTimers')[name],
    enumerable: true,
    writable: true,
  });
};
defineLazyTimer('requestAnimationFrame');
defineLazyTimer('cancelAnimationFrame');

it('has a defined requestAnimationFrame', () => {
  expect(global.requestAnimationFrame).toBeDefined(); // passes
});

it('has a defined cancelAnimationFrame', () => {
  expect(global.cancelAnimationFrame).toBeDefined(); // fails
});

Hey @cpojer, is there any chance you've had a chance to look at this? I've hit a bit of a wall looking into it, but it does appear to be jest related.

It may be because of jest.resetModules() which will re-evaluate those module factories.

So is there a viable solution to the problem?

@cpojer I could be missing something, but as far as I can tell jest.resetModules() doesn't seem to be causing any trouble. Neither cAF nor rAF are defined on global when resetModules runs in my small repro branch (this._environment.global.hasOwnProperty('requestAnimationFrame') returns false).
@frapontillo Are you encountering it? If you need to make your tests run there's a workaround at the bottom of my first post, I've been using it and it's been working so far. As for fixing whatever's going on, I understand it well enough yet to say, though the issue doesn't seem to be present in the RN environment itself so I'm assuming there must be a workaround.

If that's not it, then it is an issue with how react-native is set up. As I've consistently pointed out, this seems like something that should be fixed in the react-native repo.

@liamfd that solves it, thanks.

@cpojer I'll go ahead and open an issue over there. Sorry about that, I held off because as I dug into it it seemed to me to be more jest related.


Segmentation Fault since Rust 1.49.0 in vk_sys::DevicePointers::CreateComputePipelines

Version of vulkano: 0.20
OS: Arch Linux
GPU (the selected PhysicalDevice): Radeon RX 5500 XT, API version: 1.2.162
GPU Driver: AMDGPU
Rust version: 1.49.0

Issue
Since Rust 1.49.0 Vulkano 0.20 segfaults for me, Rust 1.48.0 was fine. The minimal example produces the following output:
Available device: Radeon RX 5500 XT, API version: 1.2.162
QueueFamily { physical_device: PhysicalDevice { instance: <Vulkan instance<PHONE_NUMBER>0736>, device: 0 }, id: 0 } supports compute: true, supports graphics: true
QueueFamily { physical_device: PhysicalDevice { instance: <Vulkan instance<PHONE_NUMBER>0736>, device: 0 }, id: 1 } supports compute: true, supports graphics: false
QueueFamily { physical_device: PhysicalDevice { instance: <Vulkan instance<PHONE_NUMBER>0736>, device: 0 }, id: 2 } supports compute: false, supports graphics: false
[1]    9608 segmentation fault (core dumped)  cargo run

gdb gives me the following backtrace:
(gdb) run
Starting program: /home/stephan/rust/vl_bug/target/debug/vl_bug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Available device: Radeon RX 5500 XT, API version: 1.2.162
QueueFamily { physical_device: PhysicalDevice { instance: <Vulkan instance<PHONE_NUMBER>1696>, device: 0 }, id: 0 } supports compute: true, supports graphics: true
QueueFamily { physical_device: PhysicalDevice { instance: <Vulkan instance<PHONE_NUMBER>1696>, device: 0 }, id: 1 } supports compute: true, supports graphics: false
QueueFamily { physical_device: PhysicalDevice { instance: <Vulkan instance<PHONE_NUMBER>1696>, device: 0 }, id: 2 } supports compute: false, supports graphics: false

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff48e3b44 in ?? () from /usr/lib/amdvlk64.so
(gdb) bt
#0  0x00007ffff48e3b44 in ?? () from /usr/lib/amdvlk64.so
#1  0x00007ffff486d647 in ?? () from /usr/lib/amdvlk64.so
#2  0x00007ffff48896f5 in ?? () from /usr/lib/amdvlk64.so
#3  0x00007ffff4893e4c in ?? () from /usr/lib/amdvlk64.so
#4  0x0000555555567b6f in vk_sys::DevicePointers::CreateComputePipelines (self=0x555555b60dc8,
    device=93824997595376, pipelineCache=93824996633232, createInfoCount=1, pCreateInfos=0x7fffffffccc0,
    pAllocator=0x0, pPipelines=0x7fffffffcd70)
    at /home/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/vk-sys-0.5.3/src/lib.rs:2848
#5  0x000055555556d6e2 in vulkano::pipeline::compute_pipeline::ComputePipeline<vulkano::descriptor::pipeline_layout::sys::PipelineLayout<vl_bug::cs::Layout>>::with_unchecked_pipeline_layout<vulkano::descriptor::pipeline_layout::sys::PipelineLayout<vl_bug::cs::Layout>,vulkano::pipeline::shader::ComputeEntryPoint<(), vl_bug::cs::Layout>> (device=Arc(strong=6, weak=0) = {...}, shader=0x7fffffffddd8,
    specialization=0x555555613386, pipeline_layout=..., cache=...)
    at /home/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/vulkano-0.20.0/src/pipeline/compute_pipeline.rs:171
#6  0x000055555556dbe3 in vulkano::pipeline::compute_pipeline::ComputePipeline<()>::new<vulkano::pipeline::shader::ComputeEntryPoint<(), vl_bug::cs::Layout>> (device=Arc(strong=6, weak=0) = {...},
    shader=0x7fffffffddd8, specialization=0x555555613386, cache=...)
    at /home/stephan/.cargo/registry/src/github.com-1ecc6299db9ec823/vulkano-0.20.0/src/pipeline/compute_pipeline.rs:76
#7  0x000055555556f086 in vl_bug::main () at src/main.rs:71
(gdb)

I could improve the backtrace, if I can figure out how to get debug symbols for /usr/lib/amdvlk64.so for Arch Linux.

You could try radv for Mesa:
mkdir build
export CFLAGS='-O0 -ggdb3"
meson configure ~/build/ -Dvulkan-drivers="amd"  --buildtype debug --prefix /tmp/mesa/usr/local
ninja -C ~/build

You could try radv for Mesa:
mkdir build
export CFLAGS='-O0 -ggdb3"
meson configure ~/build/ -Dvulkan-drivers="amd"  --buildtype debug --prefix /tmp/mesa/usr/local
ninja -C ~/build

@stephan-cr Thank you for reporting!
Your example leads to freezes on my machine(Rust 1.49, Vulkan 0.20, Ubuntu 18.04, Radeon RX Vega M, API version 1.2.162). so I can confirm the bug. Commenting out Pipeline Cache object usage resolving it, so the issue might be somewhere inside.
Would you mind to help in debugging it down?

@stephan-cr Thank you for reporting!
Your example leads to freezes on my machine(Rust 1.49, Vulkan 0.20, Ubuntu 18.04, Radeon RX Vega M, API version 1.2.162). so I can confirm the bug. Commenting out Pipeline Cache object usage resolving it, so the issue might be somewhere inside.
Would you mind to help in debugging it down?

ok, I think I found a root cause(at least one of them). The Cache object is deallocating:
https://github.com/vulkano-rs/vulkano/blob/master/vulkano/src/pipeline/cache.rs#L246
before Pipeline creation:
https://github.com/vulkano-rs/vulkano/blob/master/vulkano/src/pipeline/compute_pipeline.rs#L173
which is a certainly Vulkano bug, and needs to be resolved somehow in Vulkano, but as a temporary workaround one can just prolong the cache lifetimes(from the @stephan-cr example):

    let shader = cs::Shader::load(device.clone()).expect("failed to create shader module");

    let cache = PipelineCache::empty(device.clone()).unwrap();
    let _compute_pipeline = Arc::new(
        ComputePipeline::new(
            device.clone(),
            &shader.main_entry_point(),
            &(),
            Some(cache.clone()),
        )
        .expect("failed to create compute pipeline"),
    );

    // prolong cache lifetime
    let cache = cache;
    cache.clone();

We intorduced a capability to use PipelineCache just recently(in version 0.20.0), and unfortunately didn't test use scenarious well. I will think on how to fix it properly(and will be appreciated for your on fixing help too!).
Thank you for catching and reporting! :)

ok, I think I found a root cause(at least one of them). The Cache object is deallocating:
https://github.com/vulkano-rs/vulkano/blob/master/vulkano/src/pipeline/cache.rs#L246
before Pipeline creation:
https://github.com/vulkano-rs/vulkano/blob/master/vulkano/src/pipeline/compute_pipeline.rs#L173
which is a certainly Vulkano bug, and needs to be resolved somehow in Vulkano, but as a temporary workaround one can just prolong the cache lifetimes(from the @stephan-cr example):

    let shader = cs::Shader::load(device.clone()).expect("failed to create shader module");

    let cache = PipelineCache::empty(device.clone()).unwrap();
    let _compute_pipeline = Arc::new(
        ComputePipeline::new(
            device.clone(),
            &shader.main_entry_point(),
            &(),
            Some(cache.clone()),
        )
        .expect("failed to create compute pipeline"),
    );

    // prolong cache lifetime
    let cache = cache;
    cache.clone();

We intorduced a capability to use PipelineCache just recently(in version 0.20.0), and unfortunately didn't test use scenarious well. I will think on how to fix it properly(and will be appreciated for your on fixing help too!).
Thank you for catching and reporting! :)

Your proposed workaround works.
To be honest, while I moved from 0.19 to 0.20, the compiler complained about a missing cache for ComputePipeline::new and I quickly fixed that by simply providing that cache, without putting much thought into it.
Let me know how I can help out.

Your proposed workaround works.
To be honest, while I moved from 0.19 to 0.20, the compiler complained about a missing cache for ComputePipeline::new and I quickly fixed that by simply providing that cache, without putting much thought into it.
Let me know how I can help out.

@Eliah-Lakhin You're right, valgrind gives me the following:
==18150== Invalid read of size 8
==18150==    at 0x53163A9: ??? (in /usr/lib/amdvlk64.so)
==18150==    by 0x5332954: ??? (in /usr/lib/amdvlk64.so)
==18150==    by 0x533D0EB: ??? (in /usr/lib/amdvlk64.so)
==18150==    by 0x14530E: vk_sys::DevicePointers::CreateComputePipelines (lib.rs:3647)
==18150==    by 0x123201: vulkano::pipeline::compute_pipeline::ComputePipeline<Pl>::with_unchecked_pipeline_layout (compute_pipeline.rs:171)
==18150==    by 0x123702: vulkano::pipeline::compute_pipeline::ComputePipeline<()>::new (compute_pipeline.rs:76)
==18150==    by 0x12245A: vl_bug::main (main.rs:71)
==18150==    by 0x14038A: core::ops::function::FnOnce::call_once (function.rs:227)
==18150==    by 0x1226BD: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:125)
==18150==    by 0x13EFB0: std::rt::lang_start::{{closure}} (rt.rs:66)
==18150==    by 0x1AD4D6: call_once<(),Fn<()>> (function.rs:259)
==18150==    by 0x1AD4D6: do_call<&Fn<()>,i32> (panicking.rs:381)
==18150==    by 0x1AD4D6: try<i32,&Fn<()>> (panicking.rs:345)
==18150==    by 0x1AD4D6: catch_unwind<&Fn<()>,i32> (panic.rs:396)
==18150==    by 0x1AD4D6: std::rt::lang_start_internal (rt.rs:51)
==18150==    by 0x13EF86: std::rt::lang_start (rt.rs:65)

I'll provide a PR for this.

@Eliah-Lakhin You're right, valgrind gives me the following:
==18150== Invalid read of size 8
==18150==    at 0x53163A9: ??? (in /usr/lib/amdvlk64.so)
==18150==    by 0x5332954: ??? (in /usr/lib/amdvlk64.so)
==18150==    by 0x533D0EB: ??? (in /usr/lib/amdvlk64.so)
==18150==    by 0x14530E: vk_sys::DevicePointers::CreateComputePipelines (lib.rs:3647)
==18150==    by 0x123201: vulkano::pipeline::compute_pipeline::ComputePipeline<Pl>::with_unchecked_pipeline_layout (compute_pipeline.rs:171)
==18150==    by 0x123702: vulkano::pipeline::compute_pipeline::ComputePipeline<()>::new (compute_pipeline.rs:76)
==18150==    by 0x12245A: vl_bug::main (main.rs:71)
==18150==    by 0x14038A: core::ops::function::FnOnce::call_once (function.rs:227)
==18150==    by 0x1226BD: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:125)
==18150==    by 0x13EFB0: std::rt::lang_start::{{closure}} (rt.rs:66)
==18150==    by 0x1AD4D6: call_once<(),Fn<()>> (function.rs:259)
==18150==    by 0x1AD4D6: do_call<&Fn<()>,i32> (panicking.rs:381)
==18150==    by 0x1AD4D6: try<i32,&Fn<()>> (panicking.rs:345)
==18150==    by 0x1AD4D6: catch_unwind<&Fn<()>,i32> (panic.rs:396)
==18150==    by 0x1AD4D6: std::rt::lang_start_internal (rt.rs:51)
==18150==    by 0x13EF86: std::rt::lang_start (rt.rs:65)

I'll provide a PR for this.

Fixed in #1469

Fixed in #1469


merge dev into main

Add (initial) workflow feature
Update streaming geometry transformation feature
Fixes several bugs

🎉 🎉 🎉


GPT-3 Smart Completion in DBeaver Community 23.1.3

Description
The GPT-3 Smart Completion button in DBeaver Community 23.1.3 cannot be used.
The GPT-3 Smart Completion icon cannot be clicked on the left bar. Now a red square appears instead of the icon.

DBeaver Version
Community version 23.1.3
Operating System
Windows 10
Database and driver
MySQL, MariaDB
Steps to reproduce
No response
Additional context
No response

How have you installed DBeaver? As an Eclipse plugin, as a portable version or with installer?

from "dbeaver-ce-23.1.3-x86_64-setup.exe"

Similar issue #22276

Thank you for bug report.

The fix will be available in the next version (23.3.2).


Remove ext/ctype dependency

Using ctype_digit() in two places is unnecessary given the myriad ways to determine if a string contains only digits. Removing these calls it makes life much easier for those who build PHP with --disable-all (me ... all the time).

:+1:  thanks!


SudachiTokenizer should set doc.is_tagger

Hi, thank you for this great repo!
I found that doc.is_tagged isn't set by ja_ginza.
This property should be set by SudachiTokenizer like spacy.Tagger (https://github.com/explosion/spaCy/blob/45efdb1ef7ca9323d058a3312747b7b258154ead/spacy/pipeline/pipes.pyx#L454)

@tamuhey Thank you for sending this PR. It's necessary to set True to doc.is_tagged. I'd merge it!


refactor: Move methods in pkg/clients/ into invidual util packages

Description of your changes
This moves the individual pkg/clients/*.go files into their own pkg/utils/ packages to provide better modularization. It also makes imports a bit cleaner as the pkg/clients was imported in the code with many different names (awsclients, awsclient, clients, aws etc.).
There are no functional changes to the code. Only the imports have changed. In a very small amount of places the pointer function has been replaced with the respective one from k8s.io/utils/ptr.
I have:

[x] Read and followed Crossplane's contribution process.
[x] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested
n.a.

I think we should ensure that the replaced functions have identical behaviour, it will be very hard to test if any of these changes have negative side effects?
        controller_test.go:239: r: -want, +got:
              &v1beta1.Topic{
              	TypeMeta:   {},
              	ObjectMeta: {Annotations: {"crossplane.io/external-name": "arn:aws:sns:ap-south-1:862356124505:some-topic"}},
              	Spec: v1beta1.TopicSpec{
              		ResourceSpec: {},
              		ForProvider: v1beta1.TopicParameters{
              			Region:         "",
              			Name:           "some-topic",
              			DisplayName:    &"some-topic-01",
            - 			KMSMasterKeyID: &"",
            + 			KMSMasterKeyID: nil,
            - 			Policy:         &"",
            + 			Policy:         nil,
            - 			DeliveryPolicy: &"",
            + 			DeliveryPolicy: nil,
              			FifoTopic:      nil,
              			Tags:           nil,
              			```

Sorry, I think I messed something up while search-replacing the pointer methods. It should now work without any behavioral changes.


Add ability to use alternative kubeconfig

I store my kubeconfigs at separate paths to ensure there isn't overlap between prod/pre-prod clusters. There isn't a way today to select a non-default kubeconfig file, so jet-pilot basically doesn't work.
It would be great if I could specify an alternative path in the settings.

Thanks for the update! I'll check this out soon :)

:rocket: This issue is resolved in version 1.27.0 of JET Pilot!


Add support for node-specific options to http(s).request

This PR will allow users to specify nodeOptions to fetch for use directly in the http(s).request call.  This is especially helpful for https and client certificates, server validation etc.  Syntax is as follows:
fetch("http://example.org", {
  nodeOptions: {
    setHost: false
});

For TLS client certificate authentication you could do
fetch("https://example.org", {
  nodeOptions: {
    key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
    cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
  }
}

This kind of pr/feature request have usually been rejected for a couple of times (See #15 for example)
Reason being that we want to be as close to the spec as possible.
If you want to set a custom cert, you can do that with a custom Agent
const agent = new https.Agent({
  key: fs.readFileSync(`${CERT_PATH}.key`),
  cert: fs.readFileSync(`${CERT_PATH}.crt`),
  rejectUnauthorized: false
})

fetch(url, { agent })

There have been a couple of request to expose the request or make node fetch modular somehow. even being more event driven. (#284) to customize/debug the underlying http

If we look into #427 (FetchObserver (for a single fetch))
then we might have some playground to do this kind of things.
fetch(url, {
  observe(observer) {
    observer.onstatechange = evt => {
      if (evt.state === 'requesting') {
        // do something with `evt` or `evt.target` and modify something
      }
    }
  }
)

The agent works for me.  Thanks!
On Thu, Oct 18, 2018, 6:05 PM Jimmy Wärting<EMAIL_ADDRESS>wrote:

This kind of pr/feature request have usually been rejected for a couple of
times (See #15 https://github.com/bitinn/node-fetch/issues/15 for
example)
Reason being that we want to be as close to the spec as possible.
If you want to set a custom cert, you can do that with a custom Agent
const agent = new https.Agent({
key: fs.readFileSync(${CERT_PATH}.key),
cert: fs.readFileSync(${CERT_PATH}.crt),
rejectUnauthorized: false
})
fetch(url, { agent })

There have been a couple of request to expose the request or make node
fetch modular somehow. even being more event driven. (#284
https://github.com/bitinn/node-fetch/issues/284) to customize/debug the
underlying http
If we look into #427 https://github.com/bitinn/node-fetch/issues/427
(FetchObserver (for a single fetch))
then we might have some playground to do this kind of things.
fetch(url, {
observe(observer) {
observer.onstatechange = evt => {
if (evt.state === 'requesting') {
// do something with evt or evt.target and modify something
}
}
}
)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bitinn/node-fetch/pull/538#issuecomment-431203226,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABUiTfArVZ4popEOPJdQvt1MSxXBQn-bks5umRdNgaJpZM4XvWSj
.

So it's okay to close this?

Yeah, that should be fine.  Although, agent is non-standard as well right?
Since it allows manipulation of the connection, I think my pull request has
no use unless you really want to suppress the host header like I do in the
unit tests in this PR.  Am I missing a use case that this PR would enable
that agent would not with the current state of Node?
On Thu, Oct 18, 2018 at 7:58 PM Jimmy Wärting<EMAIL_ADDRESS>wrote:

So it's okay to close this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bitinn/node-fetch/pull/538#issuecomment-431220426,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABUiTeurBtUF3wnjImHkcVbjF8J-Ct1cks5umTHIgaJpZM4XvWSj
.

agent is non-standard as well right?

Yea, it has existed from almost the very first beginning

Am I missing a use case that this PR would enable
that agent would not with the current state of Node?

Don't know


1 quickstart changed

Summary

Click the link(s) below to view a preview of your changes on newrelic.com/instant-observability - apache

Click the link(s) below to view a preview of your changes on newrelic.com/instant-observability - apache

Click the link(s) below to view a preview of your changes on newrelic.com/instant-observability - apache


Don't understand why --vendor not exclude vendor directory

dlabutin@dlabutin-mbp generator (master) $ go get -u gopkg.in/alecthomas/gometalinter.v2
dlabutin@dlabutin-mbp generator (master) $ gometalinter --version
master

dlabutin@dlabutin-mbp generator (master) $ gometalinter ./... --vendor
.....
vendor/github.com/go-chi/render/content_type.go:4:2:warning: could not import context (cannot find package "context" in any of: (unconvert)
vendor/github.com/go-chi/render/content_type.go:5:2:warning: could not import net/http (cannot find package "net/http" in any of: (unconvert)
vendor/github.com/go-chi/render/content_type.go:6:2:warning: could not import strings (cannot find package "strings" in any of: (unconvert)
vendor/github.com/go-chi/render/decoder.go:4:2:warning: could not import encoding/json (cannot find package "encoding/json" in any of: (unconvert)
vendor/github.com/go-chi/render/decoder.go:5:2:warning: could not import encoding/xml (cannot find package "encoding/xml" in any of: (unconvert)
....

I'm not that familiar with kingpin/ I'm not sure if interspersed flags are allowed. Does it still happen if you put --vendor before the positional args?
gometalinter --vendor ./...

If that doesn't work could you include the output of gometalinter --debug --disable-all --enable unconvert ./... ? It should contain the full commands that were run.

I am sorry.
gometalinter --install
solved my problem.

@Labutin out of curiosity, do you have $GOROOT set?


may be you can support some phone number ? I testing at 8.8.11 version

I testing at 8.8.11 version,some phone series type is UNKNOWN.
I list your cannot support some phone series:

Brazil:
https://en.wikipedia.org/wiki/Telephone_numbers_in_Brazil
ten-digit is not support. it is local(fixed) phone number.
as:
+5597916772XX
result:
phone type is UNKNOWN.

2.Cameroon
https://en.wikipedia.org/wiki/Telephone_numbers_in_Cameroon
New Number  +237 7xxxxxxx  is not support
as:
+237 7xxxxxxx
result:
phone type is UNKNOWN.
3.Philippines
https://en.wikipedia.org/wiki/Telephone_numbers_in_the_Philippines
Mobile phone area codes 9xxxxxxxxx is not support
as:
+6399XXXXXXXX
result:
phone type is UNKNOWN.
4.Mexico/Argentina
https://en.wikipedia.org/wiki/Telephone_numbers_in_Mexico
https://en.wikipedia.org/wiki/Telephone_numbers_in_Argentina
Mexico/Argentina why not using FIXED_LINE?
as:
+529222567XXX
+541122591XXX
result:
phone type is FIXED_LINE.
5.Sudan
https://en.wikipedia.org/wiki/Telephone_numbers_in_Sudan
9100XXXXXX is not support?
as:
+24910033XXXX
result:
phone type is FIXED_LINE.
Thanks for your answer. I only just recommendation.

@xufanghui,
Thank you for taking the time to improve libphonenumber!
For your next metadata issue, we invite you to file issues in Google's new Issue Tracker, which we're currently testing.

Brazil
As per the ITU doc Pg.4/7, only 97[2-5] 10 digit ranges are valid. The number provided by you is 979 which is not given in the official doc. Please share any working numbers or evidence you may have. See our guidelines.

Cameroon
As per ITU Doc Pg. 2/8 second example + 237 7X XX XX XX becomes + 237 6 7X XX XX XX for a mobile number of the MTN Cameroon network. So now all the numbers in Cameroon start with prefix 6. We do not consider Wikipedia has official evidence for all the countries as they might not have the updated information :)

Philippines
We are already supporting +63 99[4-9]XXXXXXX range. This is already inline with Wikipedia. For Philippines we have used Wikipedia as the source to update our library. Could you please mention the exact range that you are facing the issue with?

Mexico/Argentina
To understand about Mexico and Argentina phonenumbers, I request you to go through our FAQ for better understanding :)

Sudan
As per the ITU Doc fixedline with prefix 10 is not mentioned. As mentioned earlier we do not consider Wikipedia as the source to update phone numbers for all the countries. Also we were unable to find  any online numbers for the prefix 11. Please share any working numbers or evidence you may have. See our guidelines.

Sudan - We already have a bug for number starting with 1, please see #1554 for more updates.

Hi,
We haven't received a response from you yet about Brazil's prefix 979 and Philippines's exact ranges that needs to be supported. Would it be possible for you to provide an update in order for us to move forward with fixing this issue?

I'm closing as this issue is infeasible for us to fix at this point (we need more information). Please re-open if you respond so we pick up on it.


Fix typo

Test suite still failing due to RubyMotion already being up to date. I can't imagine this simple typo fix causing the test suite to fail, so I'm going to merge this.


try: use ImgixClient with default import syntax

Description

Trying out default imports without module interop first and then with interop + import * convention.

Checklist: Fixing typos/Doc change

[ ] The target branch is beta. This is important for our CI/CD config.
[ ] Each commit follows the conventional commit spec format: e.g. chore(readme): fixed typo. See the end of this file for more information.

Checklist: Bug Fix

[ ] The target branch is beta. This is important for our CI/CD config.
[ ] Each commit follows the conventional commit spec format: e.g. chore(readme): fixed typo. See the end of this file for more information.
[ ] All existing unit tests are still passing (if applicable)
[ ] Add new passing unit tests to cover the code introduced by your PR
[ ] Update the readme
[ ] Update or add any necessary API documentation
[ ] Add some steps so we can test your bug fix

Checklist: New Feature

[ ] The target branch is beta. This is important for our CI/CD config.
[ ] Each commit follows the conventional commit spec format: e.g. chore(readme): fixed typo. See the end of this file for more information.
[ ] Any breaking changes are specified on the commit on which they are introduced with BREAKING CHANGE in the body of the commit.
[ ] If this is a big feature with breaking changes, consider opening an issue to discuss first. This is completely up to you, but please keep in mind that your PR might not be accepted.
[ ] Run unit tests to ensure all existing tests are still passing
[ ] Add new passing unit tests to cover the code introduced by your PR
[ ] Update the readme
[ ] Add some steps so we can test your cool new feature!

Steps to Test

Related issue: [e.g. #42]
Code:
// A standalone JS example of what the PR solves

Steps:

Go to '...'
Click on '....'
Scroll down to '....'
See that the error has been fixed

Opened to try some things, now closing.


Timestamp on messages?

Hi,
Sometimes I'll get a message after I've closed and re-opened the app but I don't know when it was sent as there seems to be some major lag some times.  Is there any way to put timestamps on messages?  Or are they there and I just can't see them?

Timestamp tooltip added in v1.4.0 (http://fuckr.me/ will be updated in a few hours).


House flood table incorrectly implements news effects

The news effects in round 3 are:

The total table per community CORRECTLY shows:

The table per house INCORRECTLY shows:

The data seems to be stored wrongly in the HouseGroup table:

The data is now correct in the database:

And in the housegroup table:

Solved.


Tag a new version?

There have been quite a few commits since the last tagged version, and it's easier to get new code into more distributions if you tag a new version, if you could.

Yeah, it makes sense and will do it next week.

Yeah, it makes sense and will do it next week.

Looks like you tagged 1.5.3, so closing this issue.


Error loading Solution ChartWin.Sln

\Source\Repos\winforms-datavisualization-net5\src\System.Windows.Forms.DataVisualization.Design\System.Windows.Forms.DataVisualization.Design.csproj : error  : The project file cannot be found.
that file does not exist in fact the system directory does not exist.
BTW the demos look great and run.

It's strange, I've right now downloaded the zip file of the project and everything was ok, can you try again?
the Design project is not part of the solution, you have to open the "DataViz.sln" in the main directory not the "ChartWin.sln".
I'll remove the file to avoid misunderstandings
Regards,
Angelo

I didn't use the zip, I opened using Clone from Visual Studio


Add version field to pyproject.toml for pyluwen (v0.4.8)

Changes

Added version = "0.4.8" to crates/pyluwen/pyproject.toml.

Why this is needed

This change resolves build failures occurring during the installation of pyluwen via pip.
This issue also affects the installation of the tt-smi package, as pyluwen is a dependency.

Installation Failure Log (Before Adding Version)
pip install ./crates/pyluwen
Processing ./crates/pyluwen
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      💥 maturin failed
        Caused by: `project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-7v6sai1t', '--interpreter', '/home/dongjin/anaconda3/bin/python']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-7v6sai1t --interpreter /home/dongjin/anaconda3/bin/python`
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

After adding version in crates/pyluwen/pyproject.toml.
 pip install ./crates/pyluwen
Processing ./crates/pyluwen
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyluwen
  Building wheel for pyluwen (pyproject.toml) ... done
  Created wheel for pyluwen: filename=pyluwen-0.4.8-cp312-cp312-linux_x86_64.whl size=616338 sha256=064eb4d1355f76df2520b5f27a270a9dcf75b9e7a2d401a521d7ce798e236b3d
  Stored in directory: /tmp/pip-ephem-wheel-cache-gt9sgh38/wheels/19/55/1c/9c3984010e91ebb2f6adb1c87d9ba112a1172c13d4c5426861
Successfully built pyluwen
Installing collected packages: pyluwen
  Attempting uninstall: pyluwen
    Found existing installation: pyluwen 0.4.8
    Uninstalling pyluwen-0.4.8:
      Successfully uninstalled pyluwen-0.4.8
Successfully installed pyluwen-0.4.8

This also impacts the tt-flash/pyproject.toml and I believe just this fix won't fix as the line in tt-flash will pick a version before your fix:
"pyluwen<EMAIL_ADDRESS>Also likely will not work with tt-smi because I believe this will roll back to before this fix unless the tag / version are updated to include your work.
'pyluwen<EMAIL_ADDRESS>If a new 0.4.6 and new 0.4.8 are made, then only this repo needs to be fixed (kind of hack because there would be 2 different versions of the same version). If new version is made, then the other two will need to refer the new version (a cleaner way as each version is its own).

What version of pip and python is this happening on as I can't reproduce this

Apparently there's an unexpected Christmas day release of Maturin that's causing issues:
https://github.com/PyO3/maturin/issues/2390
and
https://github.com/PyO3/maturin/pull/2391
This should be flipped to:
[project]
dynamic = ["version"]

https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#version
and double checked before it can be merged.  An expanded commit message and a sign-off would also be appreciated.

The fix you proposed works for me (as a commenter, not PR author)
Currently: tt-smi uses 0.4.8, tt-flash uses 0.4.6; and tt-topology uses 0.3.8 version of luwen.
I  built each with tip + your change and they built and ran; no testing beyond that.
Thanks.

@dongjin-na @windwardly Happy to add you to https://github.com/tenstorrent/luwen/pull/12 as "reported-by" and "tested-by" - just give me a ping if you want to do that before we queue up the PR

@dongjin-na @windwardly Happy to add you to #12 as "reported-by" and "tested-by" - just give me a ping if you want to do that before we queue up the PR

No thank you. Just happy to have it fixed and propagated. Thank for your work!

@dongjin-na @windwardly Happy to add you to https://github.com/tenstorrent/luwen/pull/12 as "reported-by" and "tested-by" - just give me a ping if you want to do that before we queue up the PR

Thanks for the offer. Please add me as "reported-by." I appreciate it.

Closing as #12 covers this better


More tweaks for reference counting with binding=True

It looks like different Python versions will now
generate different reference counts during function
calls to CyFunction (due to vectorcall).
Disabled binding for the get_refcount function
(since it really doesn't need this complication)
and made one test relative instead of absolute.
Hopefully this fixes the remaining reference
counting mismatches on the enable_binding branch.

I think this should just leave w_undeclared and possible profiling failing (unless there's something I've missed). Writing tests for version-dependent reference counts does look like a nightmare for the future though.

Thanks!


Add CHECKOUT_PAID webhook

Problem
There is no way to get notified about partially paid checkouts.
Orders already have two webhooks:

ORDER_PAID - both partial and full payments
ORDER_FULLY_PAID - only full payments

We should add another webhook CHECKOUT_PAID that makes it possible to get notified about both partial and full payments on a checkout.

1. General Assumptions
Add CHECKOUT_PAID webhook that is triggered when there is a Payment made or TransactionItem is added to the Checkout even if the amount doesn't cover the Checkout.totalPrice
Acceptance Criteria

CHECKOUT_PAID has the same fields as CHECKOUT_FULLY_PAID webhook
CHECKOUT_PAID is triggered for all payments, even if they don't covert the Checkout total amount

2. API changes
Types
enum WebhookEventTypeAsyncEnum {
  # ...
  CHECKOUT_PAID
}

type CheckoutPaid implements Event {
  issuedAt: DateTime
  version: String
  issuingPrincipal: IssuingPrincipal
  recipient: App
  checkout: Checkout
}

This will unlock a custom app that could convert paid / partially paid orders to be converted into an order

Migrated https://linear.app/saleor/issue/IFREQ-44/add-checkout-paid-webhook-for-checkout


Tentatively pin SciPy to v1.12 in CI

Ref #8272
Test failures are observed after SciPy v1.13.0. Pin Windows tests to use SciPy v1.12 until further investigation. https://ci.preferred.jp/cupy.win.cuda122/159080/

/test mini

The failing test logsumexp is interesting: the complex values differ by 2\pi, meaning the logarithm (?) picks a wrong branch in the complex plane.

Let me merge as all tests passed!


cannot find type definition: json.Number

Describe the bug
ParseComment error in file D:\xxx\xxx.go :cannot find type definition: json.Number
To Reproduce
swag init
// @Param polygon body dto.AdminMenuSaveInput true "body"
type AdminMenuSaveInput struct {
	Id         json.Number `json:"id,omitempty"`
	Pid        json.Number `json:"pid,omitempty"`
}

Expected behavior
I hope the front end can pass in string or int type, so I use json.Number
Screenshots

Your swag version
v1.8.10

Your go version
go 1.19
Desktop (please complete the following information):

OS: windows10
Browser: [e.g. chrome, safari]
Version: [e.g. 22]

Additional context
Add any other context about the problem here.

try to run swag init --pd
but json.Number is rendered as string, should be a float. example() does not work here.

I found a solution for json.Number which should not be a string value:
create a file "override.swag"
echo "replace json.Number float64" > override.swag

then use it with --overridesFile eg. :
swag init --pd --overridesFile override.swag

I found a solution for json.Number which should not be a string value:
create a file "override.swag"
echo "replace json.Number float64" > override.swag

then use it with --overridesFile eg. :
swag init --pd --overridesFile override.swag

@ubogdan maybe json.Number should be staticly mapped to a NUMBER what do you think?
Do you do this? I don't know how you solved it

Just put
replace json.Number float64
into the File not the echo command

Just put replace json.Number float64 into the File not the echo command

Thank you. I can use it after removing the dependency and installing it again. No problem


Android : Last word is not being captured

Describe the bug
When testing on an Android device with partial results the last word I utter is always missed.
E.g. When I speak "This is a test" ==> I get "This is a ". However when I say "This is a test stop", then I get "This is a test".
If I set prompt to true, then the complete sentence is shown on the Google prompt.
But w/o prompt the last word gets cut.
Is anyone else facing this issue?
To Reproduce
Steps to reproduce the behavior:

Start the "Speak" option (Prompt = false)
Say "This is a test"
Output => "This is a "

Expected behavior
App returns the complete set of words heard when prompt is set to false, similar to as seen on Google prompt
Screenshots
Adding Screenshots wont help as you cannot see what I am speaking ;)
Desktop (please complete the following information):

OS: macOS Ventura 13.0.1
Browser Chrome
Version Chrome: 110.0.5481.77 (Official Build) (x86_64)

Smartphone (please complete the following information):

Device: Tested on OnePlus & Samsung
OS: Android 12(OnePlus) , Android 13(Samsung)
Browser : Chrome
Version: Chrome: 110.0.5481.63

Additional context

Experiencing the same problem...

Experiencing the same problem on a Pixel 6a using
"@capacitor-community/speech-recognition": "^4.0.0",
"@capacitor/android": "^4.7.3",
"@capacitor/angular": "^2.0.3",

Hello, I am getting the same error that has been mentioned earlier.
Is there any update on this matter?
Thank you very much.

Hello, I am getting the same error that has been mentioned earlier.
Is there any update on this matter?
Thank you very much.

Could you please send me your code in order to help you

Hello, of course
This is the package.json
"dependencies": {     "@angular/common": "^15.0.0",     "@angular/core": "^15.0.0",     "@angular/forms": "^15.0.0",     "@angular/platform-browser": "^15.0.0",     "@angular/platform-browser-dynamic": "^15.0.0",     "@angular/router": "^15.0.0",     "@awesome-cordova-plugins/nfc": "^6.3.0",     "@capacitor-community/barcode-scanner": "^3.0.3",     "@capacitor-community/speech-recognition": "^4.0.0",     "@capacitor-community/text-to-speech": "^2.1.0",     "@capacitor/android": "4.6.3",     "@capacitor/app": "4.1.1",     "@capacitor/core": "4.6.3",     "@capacitor/haptics": "4.1.0",     "@capacitor/keyboard": "4.1.1",     "@capacitor/status-bar": "4.1.1",     "@ionic/angular": "^6.1.9",     "axios": "^1.3.4",     "ionicons": "^6.0.3",     "phonegap-nfc": "file:my-phonegap-nfc-0.0.1.tgz",     "rxjs": "~7.5.0",     "tslib": "^2.3.0",     "zone.js": "~0.11.4"   }
And this is my function where I use de speech-recognition:
async startRecognition(){     const { available } = await SpeechRecognition.available();     if(available){       SpeechRecognition.start({         popup: false,         partialResults: true,         language: 'es-ES',         maxResults: 5,       });         SpeechRecognition.addListener('partialResults',(partialResults: any) =>{              this.searchText = partialResults.matches;             this.changeDetectorRef.detectChanges();              });     }   }
Thanks for the help, it's appreciated.

This is snippet of my code which is making the call.
`
if(!this.permissionAvailable){
  console.log('Awaiting Permission check');
  this.permissionAvailable = await this.checkPermissions();
  console.log('Permission updated : ', this.permissionAvailable);
}

if(this.permissionAvailable){
  this.listening = true;
 SpeechRecognition.start({
    language: "en-US",
    //maxResults: 5,
    prompt: "Say something",
    partialResults: true,
    popup: false,
  });

  // listen to partial results
  SpeechRecognition.addListener("partialResults", (data: any) => {
    console.log("partialResults was fired", data.matches);
   if(data.matches && data.matches.length > 0){
    this.content = data.matches[0];
    this.changeDetectRef.detectChanges();
   }
    console.log(this.content);
  });
}
else{
  console.log('No speech permissions available');
  this.content = 'No speech permissions available';
  this.changeDetectRef.detectChanges();
}

`
Additionally here is an overview of the dependencies in package.json
{   "dependencies": {     "@angular/common": "^15.0.0",     "@angular/core": "^15.0.0",     "@angular/forms": "^15.0.0",     "@angular/platform-browser": "^15.0.0",     "@angular/platform-browser-dynamic": "^15.0.0",     "@angular/router": "^15.0.0",     "@capacitor-community/speech-recognition": "^4.0.0",     "@capacitor/android": "4.6.3",     "@capacitor/app": "4.1.1",     "@capacitor/core": "4.6.3",     "@capacitor/haptics": "4.1.0",     "@capacitor/keyboard": "4.1.1",     "@capacitor/status-bar": "4.1.1",     "@ionic/angular": "^6.1.9",     "ionicons": "^6.0.3",     "rxjs": "~7.5.0",     "tslib": "^2.3.0",     "zone.js": "~0.11.4"   },   "devDependencies": {     "@angular-devkit/build-angular": "^15.0.0",     "@angular-eslint/builder": "^14.0.0",     "@angular-eslint/eslint-plugin": "^14.0.0",     "@angular-eslint/eslint-plugin-template": "^14.0.0",     "@angular-eslint/template-parser": "^14.0.0",     "@angular/cli": "^15.0.0",     "@angular/compiler": "^15.0.0",     "@angular/compiler-cli": "^15.0.0",     "@angular/language-service": "^15.0.0",     "@capacitor/cli": "4.6.3",     "@ionic/angular-toolkit": "^6.0.0",     "@types/jasmine": "~4.0.0",     "@types/node": "^12.11.1",     "@typescript-eslint/eslint-plugin": "5.3.0",     "@typescript-eslint/parser": "5.3.0",     "eslint": "^7.6.0",     "eslint-plugin-import": "2.22.1",     "eslint-plugin-jsdoc": "30.7.6",     "eslint-plugin-prefer-arrow": "1.2.2",     "jasmine-core": "~4.3.0",     "jasmine-spec-reporter": "~5.0.0",     "karma": "~6.4.0",     "karma-chrome-launcher": "~3.1.0",     "karma-coverage": "~2.2.0",     "karma-coverage-istanbul-reporter": "~3.0.2",     "karma-jasmine": "~5.1.0",     "karma-jasmine-html-reporter": "~2.0.0",     "ts-node": "~8.3.0",     "typescript": "~4.8.4"   }, }
@luisgutie : Does that help or do you need any more information?

@luisgutie  Any luck finding something?

I hace bien busy. That's why i havent been able to test your code. This issue seems to have been closed. Did you find a fix? Please let me know

I have been busy. That's why I haven't been able to test your code. This issue seems to have been closed. Did you find a fix? Please let me know

@luisgutie I was able to test this yesterday and with the new changes, I am able to get the last word (at least on Android 12 device which I was testing).


never gets prematurely simplified in conditional types that use inheritance

Bug Report
🔎 Search Terms
conditional-types, never, inheritance
🕗 Version & Regression Information
TS 4.5.2
⏯ Playground Link
Playground link with relevant code
💻 Code
// define parent/child interfaces that both use a "never | undefined" generic
interface Base<T, U extends never | undefined> {
  base: T | U;
}
interface Child<T, U extends never | undefined> extends Base<T, U> {
  child: T | U;
}

// Match against _Base_, and use `infer` to find what `U` is
type AddProp<T> = T extends Base<infer T, infer U> ? { added: T | U } : { added: number };

// Use `AddProp` here U is never
const obj = {} as AddProp<Child<string, never>>;

// This assignment should work, but `added` is `string | undefined` instead of `string | never`
const a: string | never = obj.added;

Note that changing AddProp to T extends Child<infer T, infer U> works.
🙁 Actual behavior
obj.added is typed as string | undefined
🙂 Expected behavior
obj.added is typed as string | never
My guess is that U extends never | undefined in Child is getting simplified to U extends undefined when passed to Base, and so infer U sees it as "always undefined".
However, that only seems to happen in conditional types b/c with just regular variable assignment, TS still knows that Child<string, never> is a valid subtype of Base<string, never>:
// this works, a child is treated as a base
const child: Child<string, never> = null!;
const base: Base<string, never> = child;

never represents an empty union type. When you add another type to the union you don't have an empty union type anymore, so never gets removed. This is working as intended.

@MartinJohns yeah, your example makes sense, but I'm using the generic U to represent sometimes I want an empty union type (never) and sometimes I don't (undefined).
This pattern/approach, of U extends never | undefined that is later instantiated as either never or undefined, is working just fine, in many usages across a large codebase, so I get it looks weird, but IMO/AFAICT it's fine/supported.
I.e. in places like:
interface Base<T, U extends never | undefined> {
  base: T | U;
}

// `b1.base` is correctly `string`
const b1: Base<string, never> = null!;

// `b2.base` is correctly `undefined`
const b2: Base<string, undefined> = null!;

So TS is "late binding" the generic constraint of never | undefined (i.e. it does not immediately simplify it to undefined), until the generic is later instantiated & used in the rest of type.
The only wrinkle is conditional types, where the T extends Base<infer A, infer B> sees a prematurely simplified view of the generic U and thinks it must always be undefined.

Any generic can be instantiated with never, regardless of its constraint, because never, being the bottom type, is a subtype of all other types.  There is thus no fundamental difference between U extends never | undefined and U extends undefined.

Hm @fatcerberus , true, so let's remove some of the U extends never | undefined because that looks weird, and make them just U extends undefined:
// define parent/child interfaces that both use a "U | undefined" generic
interface Base<T, U extends undefined> {
  base: T | U;
}
interface Child<T, U extends undefined> extends Base<T, U> {
  child: T | U;
}

// Match against _Base_, and use `infer` to find what `U` is
type AddProp<T> = T extends Base<infer T, infer U> ? { added: T | U } : { added: number };

// Use `AddProp` here U is never
const obj = {} as AddProp<Child<string, never>>;

// This assignment should work, but `added` is `string | undefined` instead of `string | never`
const a: string = obj.added;

I assert that bug is still there, because I've instantiated Child<string, never> in the call to AddProp, using the never bottom type, but the matching on T extends Base the infer U is picking up undefined.
But U should not be undefined here. It should be never. I'm passing Child.U (which is never) to Base.U, but the conditional type has lost the never-ness.

Nobody asked me but here I am!  Child<string, never> is definitely a subtype of Base<string, undefined>, so I don't see the bug.  If there's an issue here, I'd say it's about how developers can successfully reason about type inference.
Trying to infer T and U from a type like T | U seems problematic to me.  My guess here (I'd be interested in hearing some official answer) is that when you infer Child<string, never> extends Child<infer T, infer U> the compiler takes a shortcut and does not bother with structural comparison.  It just pattern matches on type parameters and you magically get string for T and never for U, even if there were no structural dependence of Child<T, U> on its type parameters.
But (still guessing here) when you infer Child<string, never> extends Base<infer T, infer U>, the compiler does goes ahead and does a structural comparison, and then you get whatever the compiler thinks the best fit will be.  It's looking at {base: string; child: string} and has to match that to {base: T | U} for some T and U.  What happens there? Who knows! I guess the compiler says, well T is string, and then there's nothing obvious from which U can be determined here, so it falls back to the constraint, which is undefined.  Not awesome, but not a bug.
If I were you I'd improve the inference sites to be unambiguous and then see if problems still happen:
interface Base<T, U extends undefined> {
  baseT: T;
  baseU: U;
}
interface Child<T, U extends undefined> extends Base<T, U> {
  childT: T;
  childU: U;
}

type AddProp<T> = T extends Base<infer T, infer U> ? { addedT: T, addedU: U } : never;

const obj = {} as AddProp<Child<string, never>>;
const a: string = obj.addedT;
const b: never = obj.addedU;

Looks okay to me, I think.
Playground link to code

@jcalz ha! It's always a pleasure when you show up, so np.

Child<string, never> is definitely a subtype of Base<string, undefined>

Hm, yeah, that's true...
It took me awhile to figure out why your snippet was working, given how similar it is to what I was trying to do; I think what actually makes it "break", i.e. cause the same error I was seeing, is making baseU optional:
interface Base<T, U extends undefined> {
  baseT: T;
  baseU?: U;
}

This makes obj.addedU revert to undefined.
So, maybe that is what is going on; i.e. without a concrete usage of U in Base, it just fades away, and so is more likely to be simplified.
I already knew about the symbol trick, i.e.:
const T = Symbol();
interface Base<T> {
  [T]?: T;
}

To nudge marker interfaces from being structuralized away; but I'd always seen it used with [T]? instead of [T].
Granted, if I use [U]: U then my concrete implementations will actually have to implement the dummy symbol...huh.
Okay, well I think the points around "never really is a subtype of undefined" + "known behavior of unused generics in marker interfaces" has convinced me that, right, there is not a bug here. I'll try to move forward with the not-optional [U]: U nudge and see how that goes.
Thanks guys!

So, maybe that is what is going on; i.e. without a concrete usage of U in Base, it just fades away, and so is more likely to be simplified.

Yep, this is just a fact of life in a structural type system.  Given:
type Fooey<T> = { foo: string };
type A = Fooey<string>;
type B = Fooey<number>;

Unlike in a nominal type system, A and B are the same type in TS.  In certain cases with phantom types like this, TS can still recover the type parameter, but you generally can't rely on it.

Trying to infer T and U from a type like T | U seems problematic to me. My guess here (I'd be interested in hearing some official answer)

I don't have spare cycles to dig all the way into a resolved issue, but yes, this is an extremely problematic thing to do and is best avoided wherever practical.


Error when write only "<" in a string

Skript-parser version: build from master branch
JDK version: 11.0.8
Problem: if we use a string with < as only character, skript-parser will try to parse it as an expression and not as a character.
Code for reproduct:
on script load:
	print "<"

How to bypass the bug: escape the character, like this -> \<

This has something to do with the tags probably. I’ll look into it later today.

I'll explain how tags work. There are essentially two special values in strings, being tags and expressions. The parsing is different though:

Expressions and tags (only tags with brackets like <tag>) need to be completed in order to use them. If they're not complete, the code will not compile.
Tags that use the & symbol are an exception to this. If the tag is not, the code will compile with the '&' symbol added as a text (note that at the time of writing, this is not technically the case, but a PR will be opened soon that adds this behaviour).
The squared brackets are commonly used symbols though and I think it is not desired to have this behaviour. I'll make it easier to use by adding the same behaviour as the '&'-tags.

Tags need a small overhaul either way, which I will be adding in 0.2.


User unable to Get API key in nightly

Steps to reproduce

Log in to nightly.apinf.io as admin
Connect one of the available APIs to either one of the available API Umbrella proxies.
Press Get API key

Expected result:
API key is successfully retrieved and can be copied from API profile
Actual result:
There is a success message "API key successfully retrieved", but UI is showing Processing... and gets stuck for at least 5-10 minutes (after which I lost patience and refreshed the page. If you refresh the page, you can see GET API key button again.)
See screenshots from Comments

@marla-singer Could you take this task as well?

@bajiat Tested it on nightly.apinf.io and it works as expected.

@marla-singer So it was fixed by #272 ?

@bajiat Yep.

@bajiat , verified this issue on https://nightly.apinf.io v 0.40.0  and it is reproducible when API connected to 'Second nightly' proxy.


Add View.dip() function.

When building the layout in a custom view class.
In order to be able to call dip(30) directly, without having to pass by the context. Currently we have to call context.dip(30) which is less pretty.
Related issue: #95

Isn't the new AnkoContext<*>.dip() function enough in this case?

Added manually: a44aa5311f35d03ab45a384055da1e3b4ee0f8f4. Anyway, thanks for the idea!

Cool thanks!


Feature/resource node js ONLY

@pwalsh, @roll Please check

We really have improved some naming here (about cast, test) but what do you think about top-level validate method - I suppose based on current usage history it leads to some misunderstanding (I was in need to reread readme to remember is it about schema or data validation=).
So if this lib will be a role model for breaking changes in py lib - should we handle it now like renaming it to validate_schema or making it like something like swiss knife like validate(schema, data=None) with optional data schema-validation?

@zhenyab
Also what do you thing about adding examples dir to add some working piece of usage code (especially highlighting the components API)?

@zhenyab
I have on fallen test for nodejs 5.6 but it's ok for 6+ (is it a requirement?)

@roll any other comments before we merge this (we'll just merge into master for now, and not publish to NPM just yet)

great. pls do.


Protect master & devel if not already done so

I'm not sure if this is available to see given my permissions; I'd recommend protecting master and devel if that hasn't already been done. Found myself pushing changes to various remotes and don't want to accidentally blow something away upstream.

Done.


AppVeyor - full rebuild / not working (4-5 attempts)

Godot PR which will not build on appveyor :
https://github.com/godotengine/godot/pull/40148
Issue description:
We have rebuilt this PR approximately 4-5 times already on request but it's not passing; not because of the PR mainly because of appveyor having a hard limit of 60m per build, which is reasonable but the resource allocated to the builds doesn't seem to be enough to complete the entire Godot build.
Honestly not got many ideas, apart from possibly splitting up or lowering the complexity of the stuff run on appveyor.
We discussed on IRC this but wanted to put an issue in for it, just in case someone has the same issue, so not really that critical I'd just like it if we can fix it somehow
Steps to reproduce:

Rebuild my pr in appveyor #40148
Build times out with "Build execution time has reached the maximum allowed time for your plan (60 minutes)."

I hope we can fix this somehow, I can manually do the testing on windows to temporarily work around this but we possibly need a more bulletproof solution.

Working on this here https://github.com/godotengine/godot/pull/40191
will try and rule out my PR by doing a clean build, it could also be a caching issue

Relevant fix ;) #40213  🔥 🚒

Fixed by #40282.


Failed to install blocksparse

pip install blocksparse-1.0.0-py2.py3-none-any.whl
Processing ./blocksparse-1.0.0-py2.py3-none-any.whl
Requirement already satisfied: numpy in /home/user/anaconda3/lib/python3.5/site-packages (from blocksparse==1.0.0) (1.14.3)
Requirement already satisfied: scipy in /home/user/anaconda3/lib/python3.5/site-packages (from blocksparse==1.0.0) (1.1.0)
Installing collected packages: blocksparse
Successfully installed blocksparse-1.0.0

python
Python 3.5.5 |Anaconda, Inc.| (default, May 13 2018, 21:12:35)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import blocksparse
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/anaconda3/lib/python3.5/site-packages/blocksparse/__init__.py", line 6, in <module>
    bs_module = load_op_library(os.path.join(get_data_files_path(), 'blocksparse_ops.so'))
  File "/home/user/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /home/user/anaconda3/lib/python3.5/site-packages/blocksparse/blocksparse_ops.so: undefined symbol: _ZN10tensorflow7strings6StrCatERKNS0_8AlphaNumES3_S3_S3_

@mrgloom Were you able to resolve this? I'm having the same error.

Same issue!
Searching for a solution for a long time, but still don't know how to resolve it.


No way to express multiple validation errors

Expected Behavior
I have an array of objects. I want to validate that each of those objects has at least one field. Ideally, I'd like to return a message to the user saying that index 1 and 2 in the array are both missing fields.
Actual Behavior
I can't do that today because there's no concept of a non-fatal validation error. It might be useful for validation methods to take a parameter like testing.T that exposes richer error collection behavior than is possible with a return value.
/cc @n3wscott

/remove-label kind/good-first-issue

/assign @n3wscott


[feat] provide SSE (ServerSentEvents) as alternative to websocket

Describe the problem
Currently we need to use @tauriApps/plugin-websocket for unidirectional streaming (from server to client). However, there is another web standard specifically for such unidirectional streaming: Server Sent Events (SSE).
Describe the solution you'd like
Would be nice to also have @tauriApps/plugin-sse to support "server sent events".
Especially for mobile applications, SSE is a much more energy-saving alternative. Btw, in contrast to the use of the "web's native implementation", Tauri can even improve SSE communication by

optionally bypassing a "push proxy" (https://stackoverflow.com/questions/46799463/server-sent-events-sse-connection-loss-on-mobile-phones)
leaving SSE communication intact for the native application, use the native timer for SSE retry field (instead of the web timer)
enabling GZIP compression of SSE message

Alternatives considered
No response
Additional context
No response

here is stream_fetch command for tauri
rust code: stream.rs
mod stream;
fn main() {
  tauri::Builder::default()
    .invoke_handler(tauri::generate_handler![stream::stream_fetch])
    .run(tauri::generate_context!())
    .expect("error while running tauri application");
}

js code: stream.ts
import { fetch as tauriStreamFetch } from "./stream"
import { fetchEventSource } from '@microsoft/fetch-event-source';

await fetchEventSource('/api/sse', {
    fetch: tauriStreamFetch,
    onmessage(ev) {
        console.log(ev.data);
    }
});


Investigate slow R2 downloads

Lots of small .bin files being downloaded, some take 0.5s!
Can we use CF Cache?

Added cache for assets.sandbox.bio/v86/* route on Cloudflare


Add new ru_ru localization

@GrinNik Thanks for the PR!
I did notice that there are a couple of missing keys still; those are located in doc/resources/assets/*/lang, which is a separate resource folder that is only used for the online book.

@object-Object Hello, should I supplement this comit or create a new one for these files?

Adding it to this pull request would be easiest.


[Event Request] table 1294 "Applied Payment Entry" - OnGetVendLedgEntryRemAmtBeforeCalcFields

Describe the request
Hello, can you please add a new Event OnGetVendLedgEntryRemAmtBeforeCalcFields in table 1294 "Applied Payment Entry"?
    local procedure GetVendLedgEntryRemAmt(): Decimal
    var
        VendLedgEntry: Record "Vendor Ledger Entry";
        BankAccReconLine: Record "Bank Acc. Reconciliation Line";
        Result: Decimal;
        IsHandled: Boolean;
    begin
        OnGetVendLedgEntryRemAmtBeforeCalcFields(Rec, IsHandled, Result);
        if IsHandled then
            exit(Result);
        VendLedgEntry.Get("Applies-to Entry No.");
        if IsBankLCY() and (VendLedgEntry."Currency Code" <> '') then begin
            BankAccReconLine.Get("Statement Type", "Bank Account No.", "Statement No.", "Statement Line No.");
            VendLedgEntry.CalcFields("Remaining Amount");
            exit(
                CurrencyExchRate.ExchangeAmount(
                    VendLedgEntry."Remaining Amount", VendLedgEntry."Currency Code", '', BankAccReconLine."Transaction Date"));
        end;
        VendLedgEntry.CalcFields("Remaining Amount");
        exit(VendLedgEntry."Remaining Amount");
    end;

    [IntegrationEvent(false, false)]
    local procedure OnGetVendLedgEntryRemAmtBeforeCalcFields(AppliedPaymentEntry: Record "Applied Payment Entry"; var IsHandled: Boolean; var Result: Decimal)
    begin
    end;

Additional context
We have additional values to calculate the Remaining Amount and need to recalculate it to get the correct output for the procedure.
Internal work item: AB#547379

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 24752.


odd default  key binding

This extension is great. I like that I can use real vim while interfacing w/ VS Code but I had a difficult time figuring out how to exit insert mode because the Escape key does nothing by default. The Ctrl + C mentioned in the README.md did not pop out at me when I was reading about the extension and it took a while to figure out how to add the Escape key binding.
I'm curious, why bind Ctrl + C to <Esc> rather than binding Escape to <Esc>? I ended up working around this by adding this to my keybindings:
    {"key": "Escape", "command": "vscode-neovim.escape" }

I figure there's probably a good reason why you did not use the default key for <Esc> I'm just curious as to why.

Thank you for your feedback. Perhaps you're right. Probably i shouldn't have put the ctrl+c as default escape key binding (although it's valid VIM escape key by default too, but behaves slightly different than Esc in few situations).
The main reason is the Esc key is used in vscode to cancel/abort many things and i just didn't have a time to test it properly

I'll test and add Esc as second escape keybinding for next release

Any objection to also add ctrl-[ ? This is a Vi/Vim builtin ESC alias, and it's what I (and many others) use. (I configured it for myself locally, but it would be good to have it by default.)
@asvetliakov BTW, really great work on this extension! It's a huge relief coming from VScodevim (which had really bad performance/undo/etc. bugs).

Any chance this can be modified with Neovim's init.vim file? I usually use jj with a timeoutlen of 250 ms.

Any chance this can be modified with Neovim's init.vim file? I usually use jj with a timeoutlen of 250 ms.

That was my follow up question but I figured I should create a separate issue.

Probably i shouldn't have put the ctrl+c as default escape key binding (although it's valid VIM escape key by default too, but behaves slightly different than Esc in few situations).

haha Good to know! I have used vim for years but I only know the keys / commands that I use regularly. I did not know about ctrl+c (I assumed that bash would interpret this before vim does) or ctrl+[

@justinmk Thank you for making this possible! no, nothing is preventing to adding ctrl-[ as well, thanks for catch
@bad5ect0r
@gforceg
this isn't that you would want to hear but jj and jk are not supported as any insert mode mappings. And won't be. See #70 , #52 for context

I guess it's something worth getting used to if you want to use this plugin. Will change my regular vim files to also use Ctrl-C.

@bad5ect0r
I'm mapping caps lock to ctrl-c (since the old time when i had been using emacs). Many are mapping esc to caps lock too. This may help to reduce your finger stress.

@bad5ect0r per @bogdan0083 in issue #52 it looks like you can add the following to your keybindings json:
{
        "key": "j j",
        "command": "vscode-neovim.escape",
        "when": "editorTextFocus && neovim.mode == insert"
}

The only downside here is that I think you have to add such an entry for each mapping in init.vim.

@gforceg @bad5ect0r I may have one idea how to make jj (but not jk!) work without sacrificing insert mode performance

So does that mean that a good neovim-ESC keybindings.json would be:
[
  // https://github.com/asvetliakov/vscode-neovim/issues/74
  {"key": "Escape", "command": "vscode-neovim.escape", "when": "editorTextFocus && neovim.mode == insert"}
]

This wouldn't run if I disabled or removed vscode-neovim, right?
Is the editorTextFocus even needed?

Yes, correct

This wouldn't run if I disabled or removed vscode-neovim, right?
I haven't tested, but I think neovim.mode check should prevent running this command (it'll be undefined) if you have removed the extension.

Is the editorTextFocus even needed?
Yes. Otherwise you might get strange effects when focused out from the editor, e.g focused in file explorer

I'd greatly appreciate if you would investigate a solution compatible for both jk and jj from the get go. Also, multiple bindings should be supported as well. I use both jk and regular ESC for example.
Mode switching is too important to ignore any of the major solutions/combinations out there. I'd go so far as to say it's a dealbreaker.

@docwhat A better keybinding is:
[
    {
        "key": "Escape",
        "command": "vscode-neovim.escape",
        "when": "editorTextFocus && (neovim.mode != normal"
    }
]

Pressing Esc in any mode other than "normal" should take us out of that mode.

A little off-topic, but these should probably be added as well:
  {
    "key": "ctrl+n",
    "command": "selectNextSuggestion",
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
  },
  {
    "key": "ctrl+p",
    "command": "selectPrevSuggestion",
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
  },
  {
    "key": "ctrl+n",
    "command": "workbench.action.quickOpenSelectNext",
    "when": "!editorFocus"
  },
  {
    "key": "ctrl+p",
    "command": "workbench.action.quickOpenSelectPrevious",
    "when": "!editorFocus"
  }

So I can use ctrl+n & ctrl+p for selecting code suggestions and to select options in ctrl+d-derived menus.

It makes sense to me to have defaults for anything that works in neovim, which includes Escape, ctrl-[, and maybe ctrl-c

At least explain how to specify a different keybinding in the README. Not being as familiar with vscode plugin architecture, I assumed vscode-neovim.escape was a setting I had to set to "Esc" or something, not a command to attach to a keybinding.


feat(generic sampler): generic sampler.

Introducing a generic image sampler to our small (but mighty) happy family of samplers.
The generic sampler is inherited from CameraModelRotation (so it's not as generic as it can get), and adds the following functionality. There is now the option to pass preprocessing and postprocessing functions to the sampler. Functions that will be called before and after the sampling takes place.
Importantly, this PR also introduces examples of image_sampler. I think we could continue using this structure to provide users with adequate usage examples alongside our code. We may want to move the entire repository a directory down, in an effort to have a layer of separation between the entryway directory and the beginning of the python package. In an effort to show scripts that include modules in a similar way to how those would be included by users. Maybe this is better done in a separate repository that submodules mvs_utils and image_sampler. :)

Thank you for the insightful comments :robot:
This branch will be merged and deleted.


Update key-bindings.zsh

For Home key and End key support!

In my environment, Home and End keys work even without your patch (I use iTerm2). Can you add some explanation on this?

I refer to this thread
https://github.com/robbyrussell/oh-my-zsh/issues/3061#issuecomment-181801993
This setting worked for me instead of the default setting.
I use mac default Terminal 2.8.

Hey @cesc-park Why I still get the Home not work error https://github.com/robbyrussell/oh-my-zsh/issues/3061.
Have that issue when enabling vi-mode plugin! And seems "^[OH" not binding to beginning-of-line!
Here is my omz_diagnostic_dump for Home and End key work wierd.


routes.rb: uninitialized constant Facebook::Messenger::Server (Name Error)

I'm getting this error in my Rails 4.1.5 app when I try to mount. I've followed the readme and not sure what the issue is.
Any thoughts?
Thanks so much!

Hi @nekapoor,
I think we'll need to see your code and the stack trace to help you with that.

I'm closing this pending a stack trace (but even so this issue may be better suited for StackOverflow).


Support passing cli args to kaocha

I think it's quite important to be able to pass cli apps to kaocha.
Kaocha options can be added to config for more stable options.
Some options I care about:

fail-fast
run specific tests
print test plan
print configuration
use specific reporters
etc

Suggestion: I know some programs work by passing all args after this character sequence  -- .
This might work.
Having this feature would make debugging test issues like https://github.com/imrekoszo/polylith-kaocha/pull/7 .

This should already be possible to implement in consumers of p-k by providing a :polylith-kaocha/runner-opts->kaocha-poly-opts hook and any of the :polylith-kaocha.kaocha-wrapper/post-*-config hooks.
What I don't know is how to call poly test with extra args in a way that they will be available in the former.


Add support for notifications

Both on-page notifications like the ones on GitHub and service worker powered web notifications

I don't think this is a great idea anymore without an ElasticSearch database; I don't want to store thousands of notifications in SQL


feat: Add Port2Azure Redundant Connection Example

Add redundant connection example
Update README.md for both single and redundant connections
Update unused variables for both connections

In regards to https://github.com/equinix/terraform-provider-equinix/issues/384, we will start to use the _e2e_ tests for regression testing for Fabric resources. At first locally but hopefully in GHA if we can get connecting to the lower environments from there.
@manu-equinix was of the mind that we could access UAT environments from GHA.

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

Comparison is base (872618d) 59.56% compared to head (46166d2) 59.64%.
Report is 15 commits behind head on main.

:exclamation: Current head 46166d2 differs from pull request most recent head 636d0ce. Consider uploading reports for the commit 636d0ce to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #397      +/-   ##
==========================================
+ Coverage   59.56%   59.64%   +0.07%
==========================================
  Files          98       98
  Lines       19754    19737      -17
==========================================
+ Hits        11767    11772       +5
+ Misses       7684     7667      -17
+ Partials      303      298       -5

Files
Coverage Δ

equinix/data_source_metal_port.go
100.00% <100.00%> (ø)

equinix/data_source_metal_spot_market_request.go
89.89% <100.00%> (+6.06%)
:arrow_up:

equinix/resource_metal_port.go
86.80% <100.00%> (-1.41%)
:arrow_down:

equinix/resource_metal_spot_market_request.go
64.70% <100.00%> (+7.02%)
:arrow_up:

equinix/resource_metal_vrf.go
86.40% <100.00%> (-0.53%)
:arrow_down:

equinix/data_source_metal_vrf.go
89.58% <33.33%> (ø)

equinix/port_helpers.go
70.86% <72.72%> (-1.84%)
:arrow_down:

... and 3 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Move Base Dir Config to config file

https://github.com/open-contracting/kingfisher/issues/182
This moves the config of base dir from command line flags to the config file or an env variable.

I set KINGFISHER_DATA_DIR as the env var - it's a common thing to  put name of app infront to avoid clashes? We maybe want to move DB_URI to KINGFISHER_DB_URI later, preserving backwards compatibility.


docs: Use CodeGroup Mintifly component to clean up SCSS vs CSS vs Tailwind vs JS on the export formats sections

https://mintlify.com/docs/components/code-group
In other words, take a look at the docs edited in this PR, and convert the headers to just use a CodeGroup
so instead of
## CSS

## Tailwind

...

should be

<CodeGroup>

... code goes here, reference https://mintlify.com/docs/components/code-group

</CodeGroup>

I'm Interested in this issue Please assign me this issue.

Heyy anyone working on this issue?

No one is working on it yet, go for it @zishanPathan. @Bingolast there are plenty of other issues if you're interested!

Considering joining out Slack community to meet other contributors: https://join.slack.com/t/mirrorful/shared_invite/zt-1ps2xtxh0-2NaixFfFzSKZbr5gw_AHfA
@Bingolast @zishanPathan


Don't force-break SSL applications in shells

Things done

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

[x] NixOS
[ ] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Fixes #13744.

Why does the generic builder set that value of $SSL_CERT_FILE at all? What is wrong with letting curl and friends use the built-in default cert file?

cc @edolstra as the author of original https://github.com/NixOS/nixpkgs/commit/917ca8920da46b94867a01590423f66390a152c0. I suppose there were purity issues with it because applications could get SSL bundle from the host OS X or Linux system.

This change makes Nix shells less pure. Whether is desirable to have predictable SSL behaviour in nix-shell is subjective I guess.

It would be best to depend on passing --pure.

Yeah, it would be the best choice. I did patch this way because there's no way I know to distinguish one from another.

Well, setting $SSL_CERT_FILE explicitly in your environment would achieve that (e.g. in ~/.profile), as without --pure the variable would get passed and stdenv code wouldn't touch it... but it doesn't feel like good solution either.

Nitpick: the syntax seems bad.

setup: line 392: [: missing `]'

Ouch! I remember running some build and stopping as soon as it got to configure (Perl, I think) but I haven't considered that it may, e.g., use it's own builder. Wlll fix...

It doesn't break builds. I don't know why. (I'm running on a system that includes this PR.)

Hm, how have you got this message?

The message is in every build log, but it doesn't make the builds fail. Perhaps just the if fails or something...

Indeed,
$ [ "" = "" && "" = "" ]
bash: [: missing `]'
$ [ "" = "" ] && [ "" = "" ]
$

Updated and this time the snippet was tested in a Bash terminal.

Fun hack: if [ -z "$SSL_CERT_FILE$IN_NIX_SHELL" ]; then

See https://github.com/NixOS/nix/pull/933

@domenkozar @edolstra can we get this into 16.09? I just hit this on freshly deployed unstable, but didn't hit this on 16.03.

+1 for better UX on this front.

This is waiting for NixOS/nix#933 and/or https://github.com/NixOS/nix/pull/1027 – the latter doesn't seem catchable before 16.09, but how can I know...

Well, we could do another 1.11 maintenance release with the IN_NIX_SHELL change, but since it's a potential breaking change, I'm not sure if it's a good idea...
Another possibility is to have nix-shell propagate SSL_CERT_FILE, just like it does for TZ.

@edolstra: we can bump to 1.12 if you prefer. As for nixpkgs 16.09, I think we can squeeze this kind of breaking change.

BTW, getting rid of perl seems quite a major change (much larger), even if it doesn't break compatibility.

Sure, for 1.12 it's fine, but that's not going to be released any time soonish.

Merging to staging, hopefully we can get this one to 16.09 with minimal impact.


add n21 to FSOI

To fully add NOAA-21 to the system, the data has to also be added to the FSOI component.
PS: Jianjun, I just noticed you left this from your original https://github.com/GEOS-ESM/GEOSana_GridComp/pull/153

Right. Thank you! @rtodling


GetAllPieceLists() doesn't update after board.MakeMove()

foreach (Move[] move in board.GetLegalMoves())
{
    PieceList[] oldPieceList = board.GetAllPieceLists();
    board.MakeMove(move);
    if (oldPieceList == board.GetAllPieceLists() && move.IsCapture)
        Console.WriteLine("PieceList is the same after capture!");
    board.UndoMove(move);
}

The PieceList Array doesn't update after making a move with board.MakeMove().
This might be intended to only receive the PieceLists of the current board that is being played?

Hello! I had the same problem and it was solved by pulling the new version. Be sure to check the .readme FAQ frequently as it is being updated quite often

Hey, I am using the latest version (1.12) and have read the FAQ. The problem which was mentioned in the FAQ refers to the GetPieceList function. I am talking about the GetAllPieceLists function.

Keep in mind that GetAllPieceLists returns a list of lists. It will look something like this:
[
[whitepawn1, whitepawn2, ...],
[whiteknight1, whiteknight2, ...],
...,
[blackking1]
]
With a total of 12 constant elements (representing 12 unique pieces). If you remove a white pawn, you will still have the same number of elements. To achieve what you want, you need to iterate within the second list. You could do it like this:
foreach (Move[] move in board.GetLegalMoves()) {     board.MakeMove(move);     foreach (PieceList pieceList in board.GetAllPieceLists())         {             foreach (Piece piece in pieceList)             {                 // here your code to do something with the piece             }         }     board.UndoMove(move); }

I have noticed when comparing things like oldPieceList == board.GetAllPieceLists() it would still output true, even though some properties might have changed further inside of them. I never actually had a problem. Thanks @Francobdq


An error occurred when saving with 'Import Pipeline From Repository' from Pipeline.

rancher/rancher:v2.0.2
An error occurred when saving with 'Import Pipeline From Repository'
(Note that the syntax of the contents of the yaml file is incorrect.)

rancher/rancher:master 6/11
The error is handled gracefully and a message is displayed explaining that the yaml in the file is incorrect.


[FR] Would you consider adding a programmatic API?

Thank you again for the nice and useful package @gaborbernat!
Would you consider a PR that adds an API for programmatic use of pyproject_fmt (as a library instead of a CLI command)?
Is your feature request related to a problem? Please describe.
I currently maintain the ini2toml package whose main objective is to assist people migrating from setup.cfg to something pyproject.toml (not only for setuptools, but also for other tools like mypy, isort, etc...).
I would like to use pyproject-fmt in the generated TOML string.
Describe the solution you'd like
It would be nice to be able to use pyproject-fmt in the following way:
from pyproject_fmt import format

text = """
[project]
name = "myproj"
...
"""

formatted_text = format(text, indent=2)

(any alternate name suggestion is appreciated, I am bad at naming)
Describe alternatives you've considered
Currently I am using something similar to the following:
from tempfile import NamedTemporaryFile

from pyproject_fmt.cli import PyProjectFmtNamespace
from pyproject_fmt.formatter import format_pyproject

with NamedTemporaryFile(mode="w", encoding="utf-8", delete=False) as tmp:
   tmp.write(text)
   tmp.close()
   opts = PyProjectFmtNamespace(
       pyproject_toml=Path(tmp.name), stdout=True, indent=2
   )
   formatted_text = format_pyproject(opts)

But I seriously suspect those are all private APIs (also having to use a temporary file to modify a string in memory is not very handy).

I'd be ok with this. We can re-export both format_pyproject and PyProjectFmtNamespace and root level. If we do this though I'd like to add sphinx documentation generation for the public part.

Resolved by #9


Sprint - Release 5.0.3

This change fixes the following issues:

IZPACK-1239 UserInputPanel: HostAddressValidator not working as expected
IZPACK-1269 UserInputPanel: Explicit rule field validators defined in UserInputSpec.xml are ignored

IzPack project » izpack #842 SUCCESS
This pull request looks good
(what's this?)


Fix spending htlc output in api server

Was causing MissingOutputOrSpent because Htlc outputs were ignored and not added to the db

I think the address amounts in the db are not being updated when creating and spending the htlc

Yes, the idea is that amount from htlc is not accounted in the balances, because it's not actually yours unless atomic swap is complete as it can be reverted by refund.


WCAG 2.4.1 bypass blocks - SCR28: Using an expandable and collapsible menu to bypass block of content

no repeatable material on our site that needs to be skipped


Evaluate RatPack vs. WebSocket-based connection using a Relay

The project guidelines recommended usage of RatPack 2.0, since it allow easy building of REST APIs.
There's one problem with this: It requires the hosts's machine to be available from the internet, which could pose security problems / make it hard to use for non-network folks.
One possible solution for this would be to use an external Relay, something like a message broker that connects host and client.
That'd also allow us to implement real real-time features without needing to resort to polling (assuming that RatPack doesn't have support for SSE).
This issue is meant to track our findings as to ...

which tools could be used to implement such a Relay?
are there hosted solutions available?
is it architectural overhead / how much?

... and based on the findings, decide on a way to go.

As a relay, we could use SimpleMQ. It's easy to host (very minimal Docker container) yourself and could be hosted on fly.io so we don't need to manage anything.

Having a Relay would complicate not only the setup process for users, but also potential integration tests on our side.
So we should only use that if private network access show to be a problem. RatPack not having SSE support could also be a problem, but a much smaller one. Either we resort to polling, or extend RatPack.

@codeZeilen our tutor has mentioned that we should aim to make Liquid usable for polling in the final presentations.
One of the technical challenges we've identified is the connection between poll host and client.
The way it's been presented to us, we should make the host act as a server. So in order to enable clients to actually connect to it, it will have to open up access to its local network. Is that acceptable, or should we design it so that that's not necessary? (asking you b/c I assume you / one of your colleagues will be hosting the poll)

@PaulVII and me have built RPCRepo, which is a proof of concept for a Smalltalk-based RPC adapter. This answers the issue: We'll go for something relay-based. 15ac924d1e53e280abd08f6f8e177e12d493312b


TreeView: Bug with scrolling

hello,
I have a problem.
I use with TreeView for SideMenu in my app.
But when I scrolling the mouse over the children elements; he did not do anything.
How I fix do?

Inside a DrawerHost?

What is DrawerHost?

What version are you running, 1.5 or (pre release) 2.0?

<IP_ADDRESS>3
Thanks!

Thank you very very much!!!
I changed version to pre-release 2.0 and all worked out!!


refactor Valid rules initialization

Refactor Valid so that you define the rules only once during initialization of the containing entity.

Author(s): Evertt
Status: Awaiting review

Introduction
I want to change this:
class Post {
    var title: Valid<Count<String>>

    init(request: Request) throws {
        title = try request.data["title"].validated(by: Count.max(5))
    }
}

To this:
class Post {
    let title = Valid(Count<String>.max(5))

    init(request: Request) throws {
        try title.set(request.data["title"])
    }
}

Motivation
Right now you need to provide the valid character count every time you assign to this property. This means you'll be repeating yourself over and over again. And what's worse, if your properties are public then any outsider can make up their own rules about how many characters should go in title. I propose to change this so that you define your rules only once.
Proposed solution
See my example code given in the introduction.
Code snippets
See my example code given in the introduction.
Impact
This will definitely mean that current Vapor application that use validation will not compile anymore until the code has been updated. However, I guess that that's less of an issue since Vapor is still so young and incomplete.
Alternatives considered
I wouldn't know any alternative other than to not implement this change.
Decision (For Moderator Use)
On [Date], the community decided to (TBD) this proposal. When the community makes a decision regarding this proposal, their rationale for the decision will be written here.

This is an interesting point. I think one alternative that should be considered is using a ValidationSuite. It would work like follows:
class Title: ValidationSuite {
    static func validate(input value: String) throws {
        let evaluation = Count.max(5)
        try evaluation.validate(input: value)
    }
}

class Post {
    var title: Valid<Title>

    init(request: Request) throws {
        title = try request.data["title"].validated()
    }
}

I'm very interested to hear Logan's opinion though since he wrote this feature.

@Evertt Thanks for the proposal!
How do you feel about adapting a suite similar to what Tanner posted?
The original idea of this, building off of Ben-G's validation library was to create the idea that something like Valid<Title> couldn't possibly exist unless it had been validated. This means that if, for example, a function takes Valid<Title> as an argument, we know it's an appropriate value before it can even enter the function.
Looking now, I can see some value to composing your models as opposed to creating a suite (ex: Title above). With the proposed syntax, value would have to be some type of optional or something to encapsulate the possibility that a value doesn't exist. This would require consideration on whether or not we could continue to support the value safety, something I see as very important.
Let me know some of your thoughts on this

The original idea of this, building off of Ben-G's validation library was to create the idea that something like Valid<Title> couldn't possibly exist unless it had been validated. This means that if, for example, a function takes Valid<Title> as an argument, we know it's an appropriate value before it can even enter the function.

Hmm yes that does sound nice and valuable. And you know what, I'm guessing that might even still be possible. If we give Valid an associated ValidatorType type which does need to be validated on initialization. That could work, right? Then the function would look like this:
func foo(bar: Valid<Title>.ValidatorType) {
    // if we reach this line then bar is guaranteed to be valid
}

What do you think?

@LoganWright I'm more and more starting to think that the way you made it is the best it can be. It provides a way to validate even function arguments directly and it doesn't have to have the issue that I described if you make ValidationSuites.

After much thinking I no longer stand by my proposal, because I think it adds more problems than it solves. So I'm closing this issue, but feel free to reopen it if anyone wants it to be reconsidered.

Hi @Evertt
Works for me, if you give it more thought and come up with something you think is awesome, definitely share it and we can reopen! It's also here in history in case someone else wants to come in and open it up.
Thanks so much for participating in Vapor!


Wireless visualization using Ibis

Visualization of wireless network

These empty functions map sql functions to ibis
https://ibis-project.org/reference/scalar-udfs
On Fri, Nov 8, 2024 at 6:43 PM Plinio Guzman @.***>
wrote:

@.**** commented on this pull request.
In public/Coverage_Model_ibis/utils.py
https://github.com/fusedio/udfs/pull/419#discussion_r1835229392:

@.***
+def h3_cell_to_boundary_wkt(h3_cell: int) -> str:

""" Function to convert h3 cell to boundary wkt """

Is the logic for these empty functions coming from ibis?
—
Reply to this email directly, view it on GitHub
https://github.com/fusedio/udfs/pull/419#pullrequestreview-2425169220,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFCMPVTZTSYN2MRMVZ2CVVTZ7VZFJAVCNFSM6AAAAABRORNC3GVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMRVGE3DSMRSGA
.
You are receiving this because you authored the thread.Message ID:
@.***>


WslRegisterDistribution failed with error: 0x80072749

Windows Version
Microsoft Windows [版本 10.0.22635.3858]
WSL Version
<IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>-1
Distro Version
Ubuntu 22.04
Other Software
Docker version 24.0.2, build cb74dfc
Repro Steps
wsl.exe --install Ubuntu-22.04
Expected Behavior
Enter the ubuntu subsystem
Actual Behavior
正在安装: Ubuntu 22.04 LTS
已安装 Ubuntu 22.04 LTS。
正在启动 Ubuntu 22.04 LTS...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80072749
Error: 0x80072749 ???????????(????? sendto ???????????)???????????????????????
Press any key to continue...
分发“Ubuntu-22.04”的安装过程失败，退出代码： 1。
Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED
Diagnostic Logs
No response

WslLogs-2024-07-26_23-54-35.zip

WslLogs-2024-07-26_23-57-30.zip

WslLogs-2024-07-27_00-00-37.zip

@chessturo - another instance of a FPU-related kernel panic.

Closing as a dup of https://github.com/microsoft/WSL/issues/11791. We have a temporary fix listed there --- if the fix does not work for you, please let me know.