Flutter Web: ReferenceError: WeakRef is not defined

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce

Create a the default flutter project.
flutter build web
(Copy contents to a web server if needed)
Open the website in a Chromium browser v79

Expected results
Expected the website to load.
Actual results
Does not load the website and throws and error of:
ReferenceError: WeakRef is not defined.
Code sample
Code sample
Create default flutter app.

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
ReferenceError: WeakRef is not defined
/main.dart.js:32087     at Object._RouteEntry$ (http://<IP_ADDRESS>/main.dart.js:30255:124)
/main.dart.js:32087     at NavigatorState_restoreState_closure.call$1 (http://<IP_ADDRESS>/main.dart.js:102519:16)
/main.dart.js:32087     at MappedListIterable.elementAt$1 (http://<IP_ADDRESS>/main.dart.js:55051:22)
/main.dart.js:32087     at ListIterator.moveNext$0 (http://<IP_ADDRESS>/main.dart.js:54995:40)
/main.dart.js:32087     at JavaScriptObject.addAll$1 (http://<IP_ADDRESS>/main.dart.js:53686:51)
/main.dart.js:32087     at _History.addAll$1 (http://<IP_ADDRESS>/main.dart.js:101677:25)
/main.dart.js:32087     at NavigatorState.restoreState$2 (http://<IP_ADDRESS>/main.dart.js:101779:12)
/main.dart.js:32087     at NavigatorState.didChangeDependencies$0 (http://<IP_ADDRESS>/main.dart.js:102795:15)
/main.dart.js:32087     at NavigatorState.didChangeDependencies$0 (http://<IP_ADDRESS>/main.dart.js:101797:13)
/main.dart.js:32087     at StatefulElement._firstBuild$0 (http://<IP_ADDRESS>/main.dart.js:98539:30)
/main.dart.js:32087 Another exception was thrown: ReferenceError: WeakRef is not defined

Flutter Doctor output
Doctor output
Flutter (Channel main, 3.14.0-14.0.pre.134, on Pop!_OS 22.04 LTS 6.2.6-76060206-generic,
    locale en_US.UTF-8)
    • Flutter version 3.14.0-14.0.pre.134 on channel main at /home/username/apps/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cf1968aa66 (2 days ago), 2023-09-06 22:18:54 +0000
    • Engine revision fa14d33744
    • Dart version 3.2.0 (build 3.2.0-134.0.dev)
    • DevTools version 2.27.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/username/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /home/username/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2022.3)
    • Android Studio at /home/username/apps/android-studio
    • Flutter plugin version 75.1.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.81.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.70.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Pop!_OS 22.04 LTS 6.2.6-76060206-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 116.0.5845.179

[✓] Network resources
    • All expected network resources are available.

• No issues found!

I understand that to solve this issue, I need to upgrade my Chromium browser. Though, in an LG WebOS Signage player, you are unable to upgrade this version and v79 is the latest version (unfortunately).
Compiling a simple program with all:
dart compile js -o build/main.js main.dart
dart compile js -o build/main.js main.dart -O1
dart compile js -o build/main.js main.dart -O2

and running the JS output works on Chromium v79.

@ScorpiosCrux
Can you take a look at this issue and underlying comments to know if it helps to answer your question ?

Hello, I have taken a look and you cannot package your own Chrome or IE to be installed on WebOS Signage Players. Do you think there are polyfill functions like in React to support older browsers?

@ScorpiosCrux Can you take a look at this issue and underlying comments to know if it helps to answer your question ?

Do you think there are polyfill functions like in React to support older browsers?

I am not aware of this. Can you also raise this in support channels like StackOverflow ?

This is affecting a internal customer as well. The customer reports that this is a recent regression affecting users on Android, accessing the web app on versions lower than 83.
Googlers, please see the internal bug b/304452440 for more details and reason for prioritisation. Please also let me know if we should open a new issue.

The code in question is on the framework side. Routing the issue to the framework for now. The situation is that the Dart SDK provides the WeakReference type in its standard library, and the framework uses it, but behind-the-scenes it requires weak ref support at the compiler target level, and old browsers do not have FinalizationRegistry.
Possible options:

Stop using WeakReference in the framework.
Continue using it but implement a graceful fallback in the compiler (don't crash, maybe worst case leak memory).
Be strict about our browser support matrix and just treat all browsers that don't have FinalizationRegistry as unsupported.

I don't think option 1 is scalable. Any popular enough package in the ecosystem can start using WeakReference and cause breakage for apps that need to support old browsers.
Option 3 is basically status quo, but it may be unnecessarily restrictive.
I think option 2 is the best. At least the app can load in an old browser and let the user use the app for some time before running out of memory. But maybe I'm too optimistic about it. We can break apps by using other browser APIs that were introduced in the past few years.

The problem is that WeakRef is not supported in older browsers (It's Chrome 84+ ^1), and Dart to JS compilers have decided to start using JS WeakRef when compiling Dart to JS ^2.
If you're stuck in an environment where WeakRef is not available, you can still fix yourself without waiting for Flutter to do anything:
Install a WeakRef polyfill on your index.html before loading Flutter.
(Of course, a WeakRef polyfill doesn't have many of the advantages of the native implementation, namely: weak references, but it'll allow your application to run (and maybe leak memory))
In no particular order (I haven't tested them), here's a couple of WeakRef polyfills I found mentioned on the internet:

https://github.com/ungap/weakrefs/blob/master/README.md
https://github.com/jaenster/weakref-pollyfill/blob/master/readme.md

(I'm going to re-prioritize this issue to P2, since there seems to be a workaround.

I think the underlying question here is: at which layer should this graceful fallback be added? Dart compilers? The web framework? Nowhere?

The problem is that WeakRef is not supported in older browsers (It's Chrome 84+ 1), and Dart to JS compilers have decided to start using JS WeakRef when compiling Dart to JS 2.

We didn't decide to switch to JS WeakRef from something else - this is our initial implementation and is the only way to implement a WeakReference that is not a memory leak. Before we would throw UnimplementedError. Now we have a JavaScript error on older browsers but code that works on newer browsers.
If Flutter wants to support these older browsers, one option is for the engine to wrap the creation of WeakReference and Finalizer in a try-catch and implement another resource management policy when weak references are impossible on the platform. This alternative policy would be case-by-case so I'd prefer not to polyfill in the dart2js runtime as the polyfill will get it wrong for someone and give the illusion that something that is impossible is working.

An internal team has confirmed that they've had success using this:

https://github.com/ungap/weakrefs

Just by inlining the minified version of the polyfill to your index.html before loading flutter.js or main.dart.js should be enough, like this:
<html>
  <head>
    <!-- ... -->

    <script>
      // Polyfill for old browsers that don't support WeakRef.
      // (See https://github.com/ungap/weakrefs/blob/v0.1.0/min.js)
      /*! (c) Andrea Giammarchi - ISC */
      var self=this||{};try{self.WeakRef=WeakRef,self.FinalizationGroup=FinalizationGroup......
    </script>

    <script src="flutter.js" defer></script>
  </head>
  <body>
    <script>
      window.addEventListener('load', function (ev) {
        _flutter.loader.loadEntrypoint({
          ...
        });
      });
    </script>
  </body>
</html>

IMO, this is a change that shouldn't be reverted. It enables a powerful feature in Dart/Flutter on the web that was impossible to achieve before, and the mitigation for older browsers is simple.
(I'm going to close this issue, but feel free to reopen if you feel very strongly that this should be handled by Flutter/Dart)

I did commit a minimal noop polyfill in for the dart2js runtime: https://github.com/dart-lang/sdk/commit/048c7b036b4
It is now in g3, so the internal team should not need another solution.
The polyfill will be in the Dart 3.3 stable release.


chore: Add missing dependency

Fixes #82
Description
The Makefile-az.mk file uses yq, that it's not installed in the Docker image used by Codespaces / Devcontainers. This PR adds it
How was this change tested?

Running Codespaces from this branch and running the az-all task
Running with devcontainers locally

Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[X] No

Release Note

Added yq to the Dockerfile used by the devcontainer config file

Closing, use make toolchain instead :)


ppwater: Watch dazhuo.ir

ppwater requests the watch of the watch_keyword dazhuo\.ir. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

Approved by tripleee in Charcoal HQ

dazhuo\.ir has been seen in 1 true positive, 0 false positives, and 0 NAAs.


Abstracted ConcordanceWalker

@takutosato Much of this code will be familiar because you wrote it.  Most of the files changed are just moving classes to the validations package.
I couldn't see a good way to have a sufficiently flexible tool without outputting variants as a vcf and then relying on VariantsToTable.  In particular, the CRSP validation relies on non-standard annotations for the pooled bam depth and the expected allele fraction.  Also, if we use this tool to make training data for machine learning classifiers we'll want to keep as many covariates as we can.  I therefore replaced VariantStatus___ with output to vcf, but kept the commit separate in case you see another option.
I wrote the CRSP wdl that uses all this on a separate branch and am currently testing it.  Once that works I'll issue its PR.

Yea, I printing out a vcf as an output makes much more sense.


Replace psql with sqlite3

Replace psql with sqlite3 and update the wiki dev documentation.
Development.md

Hey @minh-biocommons can you merge this into main instead?


[Question/Advice] Varying resource owner url

I need to change the resource owner url depending on the grant used. However it's not safe to assume the first grant in the GrantFactory is the grant type used. At the moment I am setting a "linked" property on the provider to define which resource owner url is used.
I want to strip out the "linked" property because the grant type ultimately defines which resource owner url to use.
https://github.com/adam-paterson/oauth2-nectar/blob/master/src/Provider/Nectar.php#L110
    public function getResourceOwnerDetailsUrl(AccessToken $token)
    {
        $params = get_object_vars($this);
        $url = $this->getBaseUrl().'/collector';
        if ($this->linked != true) {
            $this->checkRequiredParameter('cardNumber', $params);
            $url = sprintf($this->getBaseUrl()."/collectors/%s/points-balance", $params['cardNumber']);
        }
        return $url;
    }

Any advice on the best way to approach this?

Hi @adam-paterson I've forked your solution and am looking into your question a bit. Can you provide a bit more details about the use cases and business logic that you'd like to enforce? Which grant types are you concerned with and how should they be expected to affect the Resource Owner Details Url?
I understand that you'd like to remove the need for the linked property and I'd like to know your intentions around replacing the logic.

Hey @stevenmaguire, thanks for looking into it with me.
Nectar have two endpoints which we can use as the resource owner (/collector and collectors/CARD-NO/points-balance). Using the authorisation_code grant this is what Nectar refer to as a "linked" account. This is the easy one. An authorised user has access to 95% of the API.
I'm working on a proof of concept with Nectar/Aimia and for this project we are required to use both linked and unlinked accounts with two different API users.
There isn't a reason for replacing the logic here, it just seems a little "messy" to me.

So, if the grant type is authorization_code the resource owner is considered to be "linked", else the resource owner is considered to be unlinked?

They have different endpoints for each grant type across the API. Not just the authorisation. But yeah thats correct.

Can you share a link for these rules?

I'll have to double check if I'm allowed to provide the API documentation. I can't find it online anywhere and I had to request it in the first place.

No longer require advice on this. Nectar won't allow a public repo


Use find_package for dlib dependency

find_package makes the use of dlib explicit in the build process.

Hmm the setup procedure in one of the recent versions must have changed for this to work. Will be merged after testing.

It seems dlib has finally added an install target


Add sticky comments to new posts soon after their appearance

Remember to set the permissions requested with PRAW.get_authorize_url

Notes on implementation:

Add a way to specifically record the fact and details of experiments, probably in a database model
Decide if you want custom code/scheduled jobs per experiment type, or whether you should handle experiments through a pipeline with conditional logic on what to do under what conditions


Files are not written

I have such task, when I want to place files to the same folder, files are not written.
If I will change target path to something like ${main}/scss/gl-uikit/test it will work and files will be generated.
const main = 'app/ui-kit'

x.icongen = function * () {
  yield this
    .source(`${main}/scss/gl-uikit/glfont.scss`)
    // Plugin that generates fontvars - 2 files
    .icongen()
    .target(`${main}/scss/gl-uikit/`)
}

@hzlmn What does the plugin look like?

Hi, sorry for delay. Plugin reads custom icon file css file and generate 2 new files with variables.
module.exports = function () {
  this.plugin('icongen', {}, function * (file, opts) {
    var data = file.data.toString()

    if (!data.length) {
      this.emit('plugin_error', {
        plugin: 'fly-icon',
        error: 'File could not be empty'
      })
    }

    // params
    var fontVarsName = opts.fontVarsName || 'glfontvars'
    var fontListName = opts.fontListName || 'glfontvars-list'
    var ext = opts.ext || '.scss'

    const model = getModel(data)

    const files = [
      {name: fontVarsName, data: createFontVarsFile(model)},
      {name: fontListName, data: createFontListFile(model)}
    ]

    // Pop glfont item
    this._.files.pop()

    files.map(f => this._.files.push({
      base: f.name.concat(ext),
      dir: file.dir,
      data: new Buffer(f.data)
    }))
  })
}

@hzlmn No problem. Here's your problem:

You are using pop() which is removing each file ({every: 1} is the default) from the global fly._.files array. So by the time this plugin is done, you have 0 files left in your array.

const arr = [1, 2, 3, 4]

const p1 = arr.pop();
//=> 4

console.log(arr);
//=> [1,2,3]

Also, it does not make sense to use this method. Fly traverses from 0 -> 4 while pop() will simultaneously be removing 4 -> 0. You'll only process half your files this way.

Secondly, you never write the new data back into your file or files array. At the very end, you should have been doing this:

this._.files = files.map(f => this._.files.push({
    base: f.name.concat(ext),
    dir: file.dir,
    data: new Buffer(f.data)
}))

However, that alone won't fix your plugin, because of pop().
Possible Replacement
Since it seems like you want to just read a bunch of files & generate entirely different output (without affecting the original files), you should be using {every: 0}. This way you can prepare and finalize the files array, as well as control when the files-loop happens.
Try this:
this.plugin('icongen', {every: 0}, function * (files, opts) {
  // params, does not change
  const vars = opts.fontVarsName || 'glfontvars'
  const list = opts.fontListName || 'glfontvars-list'
  const ext = opts.ext || '.scss'

  // prepare output array
  const out = []

  for (const f of files) {
    const data = f.data.toString()
    if (!data) continue;
    const model  = getModel(data)
    // add to our output array
    out = out.concat([{
      base: vars.concat(ext),
      dir: f.dir,
      data: new Buffer(createFontVarsFile(model))
    }, {
      base: list.concat(ext),
      dir: f.dir,
      data: new Buffer(createFontListFile(model))
    }])
  }

  // now replace files array
  this._.files = out
})

Hi, sorry maibe I missunderstood you, but

You are using pop() which is removing each file ({every: 1} is the default) from the global fly._.files array. So by the time this plugin is done, you have 0 files left in your array.

Yes I know, but in my case it will be always only one file glfont.css, then i pop this file, because plugin will work only once since we have single file, and then push new items back to this._.files array.
 files.map(f => this._.files.push({
    base: f.name.concat(ext),
    dir: file.dir,
    data: new Buffer(f.data)
 }))

So when target function is called, I got correct output here
files [ { base: 'glfontvars.scss',
    dir: '/home/olehkuchuk/Projects/gl-uikit/app/ui-kit/scss/gl-uikit',
    data: <Buffer 24 67 6c 69 63 6f 6e 2d 70 6c 61 79 2d 76 69 64 65 6f 3a 20 22 65 39 34 38 22 3b 0a 24 67 6c 69 63 6f 6e 2d 6e 75 6d 62 65 72 65 64 2d 6c 69 73 74 3a ... > },
  { base: 'glfontvars-list.scss',
    dir: '/home/olehkuchuk/Projects/gl-uikit/app/ui-kit/scss/gl-uikit',
    data: <Buffer 0a 20 20 20 20 24 66 6f 6e 74 2d 69 63 6f 6e 2d 76 61 72 69 61 62 6c 65 73 3a 20 28 0a 20 20 20 20 20 20 70 6c 61 79 2d 76 69 64 65 6f 3a 20 24 67 6c ... > } ]

Am I missing something?

and then push new items back to this._.files array.

It won't push them back anywhere. You created your own files variable here:
const files = [
    {name: fontVarsName, data: createFontVarsFile(model)},
    {name: fontListName, data: createFontListFile(model)}
]

When you map files, it won't affect anything. You don't even have it assigned to a new variable~
// what you're doing:
let files = [1, 2, 3, 4];

// you map the files
files.map(n => n * 2);
//=> [2, 4, 6, 8]

// but 'files' is unaffected
console.log(files);
//=> [1, 2, 3, 4]

// TRY AGAIN, but assign to variable
files = files.map(n => n * 2);

console.log(files);
//=> [2, 4, 6, 8]

Does that make sense?

So when target function is called, I got correct output here

Nothing in your plugin is creating or attaching files to Fly. You are only removing files via pop(). I believe another task or another plugin is sourcing or creating those two files, and that's why you think the target() array is correct.
Did you try my plugin? It works

Also, depending on the time of day, I'd be able to help you debug further via screenshare on Skype or something.

@lukeed

When you map files, it won't affect anything. You don't even have it assigned to a new variable

Yes, I create new files array, then map on it but inside map callback I push each file back to this._.files. Look here
files.map(f => this._.files.push({ // << here I push new file item
    base: f.name.concat(ext),
    dir: file.dir,
    data: new Buffer(f.data)
 }))

Oh, I overlooked that part. What is your task's source?

Not sure what you mean
x.icongen = function * () {
  yield this
    .source(`${main}/scss/gl-uikit/glfont.scss`)
    .icongen()
    .target(`${main}/scss/gl-uikit/`)
}

Here is task, I only sourcing one file glfont.scss

Sorry @hzlmn, I can't reproduce your issue 😞 Your original plugin is working for me.
Here's what I have:
const getModel = d => d
const createFontVarsFile = d => d
const createFontListFile = d => d

module.exports = function () {
  this.plugin('icongen', {}, function * (file, opts) {
    var data = file.data.toString()

    if (!data.length) {
      this.emit('plugin_error', {
        plugin: 'fly-icon',
        error: 'File could not be empty'
      })
    }

    // params
    var fontVarsName = opts.fontVarsName || 'glfontvars'
    var fontListName = opts.fontListName || 'glfontvars-list'
    var ext = opts.ext || '.scss'

    const model = getModel(data)

    const files = [{
      name: fontVarsName,
      data: createFontVarsFile(model)
    }, {
      name: fontListName,
      data: createFontListFile(model)
    }]

    // Pop glfont item
    this._.files.pop()

    files.map(f => this._.files.push({
      base: f.name.concat(ext),
      dir: file.dir,
      data: new Buffer(f.data)
    }))
  })
}

const main = 'app/ui-kit';

exports.icongen = function * () {
  yield this.source(`${main}/scss/gl-uikit/glfont.scss`)
    .icongen().target(`${main}/scss/gl-uikit/`);
}

What Node version are you on this time? And what OS?

@lukeed Hm, interesting. I use Node 6.2.0 and Ubuntu 14 LTS.
I will look on it under MacOS, maybe It's some kind of problem with writing permissions on Linux, but I hardly think, that such error can be silent.

Btw, thanks for your time and quick responses.

No problem.  I've been thinking about it too. I'll try on node 6.2

@hzlmn Works on 6.2.0
On your Ubuntu machine, try touch file.js anywhere and see if it lets you. My VM requires sudo for those actions, so you may need to do the same.

@lukeed Seems stupid, but it works after reboot :smile: Closing it.

@hzlmn Haha, odd 😜


Wiki is wrong about dwindle configuration

I tried to change the dwindle tabbed layout's boarder color and found the documentation in the wiki is wrong.
See
https://wiki.hyprland.org/0.18.0beta/Configuring/Dwindle-Layout/
and compare this to the actual source code:
https://github.com/hyprwm/Hyprland/blob/26cd1bf949d0460b754fe3b1ae7f06bd4b2535ee/src/Compositor.cpp#L1871
https://github.com/hyprwm/Hyprland/blob/26cd1bf949d0460b754fe3b1ae7f06bd4b2535ee/src/Compositor.cpp#L1872
The configuration that ended up working with Hyprland version 1.3.1-5 was:
group {
    col.border_active = $color_active_border
    col.border_inactive = $color_inactive_border
}

For all people looking into this issue:
Configuration examples I found that configure this options in the general or dwindle blocks are not working in the current upstream version of Hyprland.

You a looking to wiki for 0.18.0beta, current release version is 0.36.0, wtf bro. Select wiki version in sidebar


Development data is not filtering correctly

Click on table to filter. Shows filtered by but no results appear

This is fixed, but the text filtering needs to be improved.


GEOMESA-1655 Fix "geomesa explain" command line tool output

Signed-off-by: Matthew Zimmerman<EMAIL_ADDRESS>

This essentially sidesteps the question of what the logging level for the explainer is set to in log4j.properties and assumes that if somebody explicitly asks for a query plan by invoking geomesa explain, we can go ahead and log it at info (and print it out to the console).

great, merging


Add support for AKS SKU tier

AKS clusters have "free" and "paid" tiers. The paid tier costs
$0.10/cluster/hour and provides an increased SLA with financial backing
(so Microsoft pays you if your cluster doesn't meet that SLA).
This adds support for that feature.

Combined with https://github.com/Azure-Terraform/terraform-azurerm-kubernetes/pull/49


On restart it does not restore the previous state of the outputs

When Home Assistant (Raspberry PI3 B) is restarted, GPIO does not maintain the state of the outputs set before the restart. Is this normal or is there a way to correct the problem?

This is not part of this integration. The integration is simply mapping the hardware GPIOs to Home Assistant sensors or switches, when you reboot the device the GPIO reverts to it's default state and the integration show the correct state. Integrations in general are meant to represent hardware or device state and should not manipulate the state.
If you need to maintain a state after device reboot I highly recommend using an external device to control the IO, such as Tasmota or ESPHome, these devices can store the last state on non volatile memory and are not depended on the server state.


typed.List segfault, maybe from empty list.

Reporting a bug

[x] I have tried using the latest released version of Numba (most recent is
visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
[x] I have included a self contained code sample to reproduce the problem.
i.e. it's possible to run as 'python bug.py'.

This segfaults.
from numba import njit
import numpy as np
from numba.typed import List

@njit
def demo_list_keys(nkeys):
    np.random.seed(0)
    # create some random sized lists for keys
    tl = List()
    for _ in range(nkeys):
        tl.append(List([x for x in range(np.random.randint(10))]))
    print(tl)

    for item in tl:
        print(item)

demo_list_keys(5)

NUMBA_OPT=0 python issue6644.py works fine.

NUMBA_OPT=0 python issue6644.py works fine.

Program received signal SIGSEGV, Segmentation fault.
0x00007fa9cdfe20ab in cpython::numba::typed::typedlist::_length$2422(ListType$5bint64$5d) ()
(gdb) bt
#0  0x00007fa9cdfe20ab in cpython::numba::typed::typedlist::_length$2422(ListType$5bint64$5d) ()
#1  0x00007fa9e358c4ec in call_cfunc(Dispatcher*, _object*, _object*, _object*, _object*) ()

Program received signal SIGSEGV, Segmentation fault.
0x00007fa9cdfe20ab in cpython::numba::typed::typedlist::_length$2422(ListType$5bint64$5d) ()
(gdb) bt
#0  0x00007fa9cdfe20ab in cpython::numba::typed::typedlist::_length$2422(ListType$5bint64$5d) ()
#1  0x00007fa9e358c4ec in call_cfunc(Dispatcher*, _object*, _object*, _object*, _object*) ()

This hangs:
from numba import njit, gdb
import numpy as np
from numba.typed import List

@njit(debug=True)
def foo():
    z = List()
    z.append(1)

    tl = List()
    tl.append(z)

    print(tl)

    for item in tl:
        len(item)

foo()

This hangs:
from numba import njit, gdb
import numpy as np
from numba.typed import List

@njit(debug=True)
def foo():
    z = List()
    z.append(1)

    tl = List()
    tl.append(z)

    print(tl)

    for item in tl:
        len(item)

foo()

Debugging...
NUMBA_LLVM_REFPRUNE_PASS=1 NUMBA_LLVM_REFPRUNE_FLAGS='per_bb,diamond,fanout_raise' NUMBA_NUMBA_OPT=3 python issue6644.py

the fanout_raise seems to switch the reported problem on/off with this script.
from numba import njit, gdb
import numpy as np
from numba.typed import List

@njit(debug=True)
def foo():
    #gdb()
    z = List()
    z.append(1)

    tl = List()
    tl.append(z)

    print(tl)
    for item in tl:
        len(item)

foo.compile(())
print(foo.inspect_cfg(foo.signatures[0], strip_ir=False, interleave=True, highlight=True).display(view=True))
print(foo.inspect_disasm_cfg(foo.signatures[0]))
foo()

I've left in all the debug output generation.

Debugging...
NUMBA_LLVM_REFPRUNE_PASS=1 NUMBA_LLVM_REFPRUNE_FLAGS='per_bb,diamond,fanout_raise' NUMBA_NUMBA_OPT=3 python issue6644.py

the fanout_raise seems to switch the reported problem on/off with this script.
from numba import njit, gdb
import numpy as np
from numba.typed import List

@njit(debug=True)
def foo():
    #gdb()
    z = List()
    z.append(1)

    tl = List()
    tl.append(z)

    print(tl)
    for item in tl:
        len(item)

foo.compile(())
print(foo.inspect_cfg(foo.signatures[0], strip_ir=False, interleave=True, highlight=True).display(view=True))
print(foo.inspect_disasm_cfg(foo.signatures[0]))
foo()

I've left in all the debug output generation.

The fanout_raise prune around:
    print(tl)
    for item in tl:
        len(item)

seems legal by looking at the output of inspect_cfg. However, turning on _debug_print in nrtdynmod.py shows the premature free...
without fanout_raise:
...
*** NRT_Decref 4 [0x7fbf6e822410]
*** NRT_Decref 3 [0x7fbf6e822410]
[[1]]
*** NRT_Decref 1 [0x7fbf6e815b00]
*** NRT_Decref 1 [0x7fbf6e822410]

with fanout_raise:
...
*** NRT_Decref 3 [0x7fc4d36c6c50]
*** NRT_Decref 1 [0x7fc4d36c6c50]
[[1]]

Note the [[1]] is from the print(tl).

The fanout_raise prune around:
    print(tl)
    for item in tl:
        len(item)

seems legal by looking at the output of inspect_cfg. However, turning on _debug_print in nrtdynmod.py shows the premature free...
without fanout_raise:
...
*** NRT_Decref 4 [0x7fbf6e822410]
*** NRT_Decref 3 [0x7fbf6e822410]
[[1]]
*** NRT_Decref 1 [0x7fbf6e815b00]
*** NRT_Decref 1 [0x7fbf6e822410]

with fanout_raise:
...
*** NRT_Decref 3 [0x7fc4d36c6c50]
*** NRT_Decref 1 [0x7fc4d36c6c50]
[[1]]

Note the [[1]] is from the print(tl).

I am suspecting that the issue is related with the boxing at print(). Not sure what it is yet.

I am suspecting that the issue is related with the boxing at print(). Not sure what it is yet.

I am suspecting that the issue is related with the boxing at print(). Not sure what it is yet.

I conclude the same, from the CFG output, the prune looks legal. This is probably pointing to some issue with print.

I am suspecting that the issue is related with the boxing at print(). Not sure what it is yet.

I conclude the same, from the CFG output, the prune looks legal. This is probably pointing to some issue with print.


Added Document.setDCT to provide document creation times to Stanford'…

…s SUTime.

@EgoLaparra, @kwalcock: this PR will be merged shortly. It adds Document.setDCT to provide the DCT to Stanford's SUTime.
See the unit test in this PR for an example how to use it. Essentially, if you want to provide a DCT, you have to follow these 3 steps: mkDocument, doc.setDCT, annotate.

Acknowledged.  Eidos has DctDocumentAttachment and Metadata classes that will need to be adjusted.

Yes, these need to be formatted into the String format required by CoreNLP, and fed into the processors Document.


Question: how much processing has been done on Bayer output data?

I am using picamera in an instrumentation application using a monochromatic laser source and without lens.  To get the least processed image possible I am using the bayer=True option to capture_continuous() and the PiArrayOutput() renderer. I have disabled all processing options I can find.
I have read the 1.13 docs (which are great, BTW) but can't really find an explicit indication of where the Bayer output is pulled out of the pipeline.  For example, the Bayer array must come out from some point in the sequence of GPU actions listed in section 6.1.6 ("Background processes").  Does anyone know which actions have been done on the array before it appears as the Bayer array?
As one experiment, I set camera.hflip = True, and see that the Bayer array comes out horizontally flipped.  So at least transposing is done on the raw data before sending the Bayer array out.  It would be really nice if the Bayer came out at least before lens shading was done.

The Bayer images are as received by the SoC from the sensor.
The only parameters that therefore affect them are mode selection, exposure time, analogue gain, and H & V flips (NOT transpose, which is specifically reflecting in the line x=y).
This is all in the docs - http://picamera.readthedocs.io/en/latest/fov.html#background-processes

OK thank you.  I might suggest to clarify in the docs that it is in fact the Bayer data after mode, exposure, a-gain and flips that travels to the GPU, and the bayer option to the capture() functions intercepts it at that point.
Thank you again, the overall description was very valuable and highly useful.  And the library is working very well in my application.


(AzureCXP) Fix permissions parameter description

Fix the permissions parameter description for the BlobSasBuilder

@rloutlaw Could you please look into this PR and approve it once you get a chance ?

Hi @navba-MSFT.  Unfortunately, this file is automatically generated from the Azure SDK for .NET repository and changes here would be lost during the next docs publishing sync.  If you'd like to make these changes, you'll need to do so here.
Since we're unable to merge these changes, I'm going to close this out.


Bugfix: wrong WindowType because of i18n.

Because of i18n, the title may be not "Tooltip" in some country. For example, "提示" in Chinese.
And the unit test tooltip_view_has_TOOLTIP_type failed.

fixed in https://github.com/square/curtains/pull/30

Fixed by #30


issues with the training Code

Hey was starting my training ,
I just noticed some issues with the code quality .
like having self.sys_home_dir = '/root/autodl-tmp' or self.data_root_dir = os.path.join(self.sys_home_dir, 'datasets/dis')
these kind of things make it hard to quickly start the training and one had to just dig into the code find the issues

Hi Rishabh, To be honest, that's kind of the first thing in everything in every project. I've made almost all of them in config.py with only one appearance instead of most other projects, where you need to modify this kind of thing in many places for the definition among many Python files.

I'll further make up the config file to put these kinds of things at the beginning.


Verify design object has the attribute 'GetDesignType'

Maxwell Circuit has not the attribute 'GetDesignType'. Check before call it.

LGTM. I am assuming it could raised some exception without this check.


Empty translations not are rendered

The issue is because of this PR.
The behaviour in Laravel is to render the key when the provided translation is empty or not found... With this change the package is not working anymore with the current Laravel business logic this can lead to some incongruences.

Thanks for letting me know, will check.


feat: do not send non-JWTs in Authorization header

In preparation for the introduction of new API keys, the client library should not pass non-JWT values in the Authorization header, as requests like this will definitely fail.
Two backward compatible changes are introduced:

Configuring a createClient() with a non-JWT Supabase Key will not forward it as the Authorization: Bearer <...> header.
Configuring a createClient() with global header options that contains a non-JWT in the Authorization header will throw an error.

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

23 of 33 (69.7%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-1.1%) to 64.925%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/SupabaseClient.ts
4
5
80.0%

src/lib/fetch.ts
2
4
50.0%

src/lib/helpers.ts
17
24
70.83%

Totals

Change from base Build<PHONE_NUMBER>4:
-1.1%

Covered Lines:
120

Relevant Lines:
158

💛  - Coveralls


How to set up 2 space identation instead of 4

I have read the docs, but I don't find anything about it. It sometimes even show 1 space indentation, how can I change that

Nvm, it was a rust.vim thing


[sdk] move fuchsia tests out of flutter recipe

Fuchsia tests should be running on its own builder. This will simplify disabling the builder when something starts failing without compromising all the other tests running on flutter.py recipe.

\cc @jmagman @iskakaushik

CL to fix the recipe at https://flutter-review.googlesource.com/c/recipes/+/5940
I'm looking into updating the test runner side now.

The recipe and test script seem to be working, but Flutter driver is timing out when looking for the device. It only gives a 1s timeout which is causing issues when there are several devices connected to the host example task.

I'm able to reproduce this error locally with only 1 Fuchsia device, so it shouldn't be an issue with the timeout.

obsolete


[Good First Issues]: implement function "capitalize_word" - 8 points

Motivation
Vanus Functions are a series of pre-built functions worked within Vanus transformer. By choosing a function, users can specify the way that events will be changed.
It will be a good start if you decide to contribute to Vanus codes.
Details
This function is used to capitalize all words in a string of an existed json element.
Description
Function name: capitalize_word
Function args:

path: the json path of the string which needs to be capitalized.

Function description: Capitalize all words in a string of an existed json element. The previous value of the json object will be replaced.
Example
For example, if users' original event looks like this:
{
    "specversion" : "1.0",
    "type" : "com.example.someevent",
    "source" : "/mycontext",
    "subject": null,
    "id" : "C234-1234-1234",
    "time" : "2018-04-05T17:31:00Z",
    "comexampleextension1" : "value",
    "comexampleothervalue" : 5,
    "datacontenttype" : "application/json",
    "data" : {
        "appinfoA" : "this is jay ding",
        "appinfoB" : 123,
        "appinfoC" : true
    }
}

After the function "capitalize_word":
"pipeline":[
    {"command":["capitalize_word","$.data.appinfoA"]}
]

The transformed event should look like:
{
    "specversion" : "1.0",
    "type" : "com.example.someevent",
    "source" : "/mycontext",
    "subject": null,
    "id" : "C234-1234-1234",
    "time" : "2018-04-05T17:31:00Z",
    "comexampleextension1" : "value",
    "comexampleothervalue" : 5,
    "datacontenttype" : "application/json",
    "data" : {
        "appinfoA" : "This Is Jay Ding",
        "appinfoB" : 123,
        "appinfoC" : true
    }
}

How to implement

Fork the vanus repository.
Create a branch function-capitalize-word
Create capitalize_word.go under internal/primitive/transform/action/strings, and then implement the function.
Create capitalize_word_test.go under internal/primitive/transform/action/strings for unit test.
Register your function in internal/primitive/transform/runtime/init.go.
Submit your PR

Contribution points
Each issue counts specific points based on its difficulty. Contributors earn the corresponding points if they solve that issue. Contribution points are used to describe the contributions contributors have made.  They can also be used to get rewards when there are community events.
This issue counts 8 points.
How to claim to solve the issue
If you want to implement this function, please leave a comment in this issue like:

I'd like to implement this function, please assign this issue to me.

Vanus community will assign the issue to you on time.

I would like to implement this function. Please assign it to me.( I am a beginner and have not worked with go before, but really interested to learn go and want to contribute to the project )

I would like to implement this function. Please assign it to me.( I am a beginner and have not worked with go before, but really interested to learn go and want to contribute to the project )

Hi thanks you for your comment, I will assign it to you.

I would like to implement this function. Please assign it to me.( I am a beginner and have not worked with go before, but really interested to learn go and want to contribute to the project )

Hi @varuntumbe ,how is it going with this function? You may have some questions during implementation, Join the Slack channel to discuss with other developers. Also there you can know details about how to get contribution rewards.

I'd like to implement this function if no one else has made progress for this. I'm fairly new with go but I want to contribute.

I'd like to implement this function if no one else has made progress for this. I'm fairly new with go but I want to contribute.

Sure, glad to hear you wanna try this. I will assign it to you.

@faculerena how is it going? Its been a while now?


css space around binary operator

Description

Input
With this new feature, when I give like this input:
body>h1 {}

Expected Output
I'd like to see this output:
body > h1 {}

Environment
OS:

@legend-sabbir  - which ENV is having this issue. I have tested this in Javascript, and it works fine.
body>h1 {}
returns
body > h1 {}

i was talking about css/scss/less


Updating requirements file with missing imports: jplephem and de421

(I am not at PyCon, so if this was discussed in meat space, I don't know)
Are those actually required to hack on skyfield and/or run the tests?  Requirements.txt should be for the minimum required to effectively hack on the code.  since all the ephemerides are the same for that purpose, do you need more than one in the requirements?

These requirements were already listed in setup.py because they are hard requirements of the project itself — whereas requirements.txt, before this change, had only the additional requirements that are needed for development and testing from inside the repo.
But some of our sprinters are not in the habit of doing a pip install -e of a project, and instead expect to have requirements.txtlist everything needed for development, including the project's hard dependencies themselves. To get these developers going quickly, we added them.
Why do we need several ephemerides to develop? Good question! We need several ephemerides for testing because different sources of test numbers (the USNO, the JPL) use different ephemerides to produce their answers that we want to check against.


⚠ Spryr has degraded performance

In a1e3d52, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 3315 ms

Resolved: Spryr performance has improved in 1882f58 after 15 minutes.


AudioEffectRecord has more latency when using an USB microphone compared to an analog microphone

Godot version
3.3 Stable
System information
Solus OS 4.3
Issue description
I make a software that capture a voice input using a microphone. I realize that analog microphone with audio jack works perfectly fine but usb mic will have a latency issue. It takes time bofore showing an output that "audio is captured"
Steps to reproduce
this line of code:
var power = AudioServer.get_bus_peak_volume_left_db(AudioServer.get_bus_index("Record"), 0)
with the attached bus and audiostreamplayer setups

For some reason, usb mic user will get a delay for the output.
Minimal reproduction project
No response

@airisun Can you reproduce this delay in other recording applications such as Audacity (when using the USB microphone)?

I forgot to mention that I'm reporting this because my software users (Windows users and usb mic users) are having the delay with the exported software. Since I don't have usb mic right now, I cannot confirm if the problem is only after exporting or in the editor too. Anyone with usb microphone can try this project file.
Mic Testing.zip
This is the software: https://ai-risun.itch.io/gazo-tuber

I am wondering if moving to lower level AudioEffectCapture from AudioEffectRecord will allow you to remove the latency.

Based on issue #51195 it is fixed. But I can confirm it is still not fixed for mine. Im using Godont 3.4 Beta6.
Godot seems to repeat my voice twice
https://user-images.githubusercontent.com/50040102/140875222-1cb7bff3-2957-4da8-ab05-d810cb072360.mp4
.

My thought is, it's wasn't a delay but Godot is repeating the captured audio twice. Thus it makes Godot seems to showing a delay.

In my case, Godot repeat my audio for awhile. After than, it's not repeating but just delay.

I also get this issue or something very similar. I haven't tried 3.4.3 yet but my blue snowball also seems to get doubling, a build up of delay, and popping on both Windows 10 and 11. It works properly in every other application except for Godot.
I'm not using the record effect, instead I'm using SpectrumAnalyzer.

Your issue is probably the same as mine. I really hope someone in the community have some ideas regarding this issue. I really don't know what to do haahhaa. I love Godot and I want to continue working my software with it. I hope the issue will be resolved later. Thank you.

There is less people in the audio team so this may not be resolved soon.
https://github.com/godotengine/godot-proposals/issues/2013 was the lower level replacement for audio record we wrote for voice calls in games.

Aww I see. It's fine then. Thanks for the hardwork!


Incorrect layout is applied when the app starts with a small app window

Description
The files app seems to adopt the wide window layout when started with a small window on startup, here is a screenshot to help understand the problem (here the app was just started from the start menu)

Rotating back and forth the device is enough to cause a layout update and fix this issue.
Steps To Reproduce

Open the app as a small window
Notice the layout is wrong

Expected behavior
The window should look like this:

Files Version
Commit Hash: 965e60852c3bb7998ec000db27c5e7b32635257f
Windows Version
Windows 11 21H2 22000.132 ARM64
Relevant Assets
No response

This issue should be resolved with #5814.


add NF-Queue packet capture driver

Dear gopacket developers,
I would like to add a Linux NF Queue packet capture driver to gopacket. I'd be willing to add another type of driver... but my goal is to allow Linux users to isolate the traffic via the iptables owner module. The user can create a rule-set that uses a user-id to match traffic and directs the traffic to an NF Queue target.
I've got code here:
https://github.com/david415/go-netfilter-queue
What do you think?

Hi David
Personaly I think that's a good idea. NF Queue does not have a super great performance, I would remember but that a nice way to grab some packet on Linux... as mostly every host has iptables enabled and that enables to "cherry pick" some packets without settings the whole interface into promiscuous mode.
Laurent

Yes the NF Queue AND NF Log... either would work for my purposes. I suspect NF Log is faster but not sure. Implementing a gopacket sniffer for an iptables target is qualitatively different than simply implementing a low level BPF because it allows the user to create arbitrary iptables rule-sets to match the traffic.

Just FYI, my fork for go-netfilter-queue supports Go 1.6 (there was cgo-related issue)
https://github.com/AkihiroSuda/go-netfilter-queue

@AkihiroSuda does it also support packet injection as well as packet capture?

You can inject delay (NF_ACCEPT) and fault(NF_DROP), but it doesn't support injecting modified buffer yet

@AkihiroSuda nope. wrong. incorrect. you can in fact inject modified packets all day long. i do it all the time. if your nfqueue api doesn't support this then it's not really an nfqueue api now is it?
also... why does everyone keep rewriting go netfilter queue c binding!? i did it. someone else did it. you did it and now looky here subgraph has one too: https://github.com/subgraph/fw-daemon/tree/master/nfqueue


[README] Up the warning about disk space usage

On my Linux box, I need upwards of 70 GiB for a Debug+Assert build.

@swift-ci please smoke test and merge


USB AOA write Error

There is an issue about App can't  get register after physical re-connecting USB cable.
Mobile OS did notify the User to select one App for launching via AOA protocol and app get register on HeadUnit for the 1st time USB cable connected.
Then disconnect , keep the App alive and re-connect the USB cable, mobile OS did notify the User again meanwhile the mobile did switch to Accessory mode but can't made Hand Shake via OutPutStream write function.
Log was attached as reference. Thanks!

The Hand Shake has been transmitted successfully for the 1st time USB connected.

The following discussion may be pertinent:
https://code.google.com/p/android/issues/detail?id=20545

After doing some testing, I believe this is an app's intent issue. What I mean by this, is that the intent that listens for the AOA connection is calling the main activity every time. This might work for the first connection because the transport hasn't initialized yet, but, with any additional connections during the lifecycle of the app, the new activity will spin up another proxy and be using a transport object that isn't actually the transport object that made the connection, and therefor error when writing to the output buffer.

@khburdette  Thanks!  The issue has been fixed and could be closed.


Add documentation for Resources with the same classname

When there are two classes with the same name but in different modules, only the documentation for the routes in one of them is generated.
For example:
require 'doc_my_routes'

require 'sinatra/base'
require 'rack'

module Extra
  class Api < Sinatra::Base
    extend DocMyRoutes::Annotatable

    summary 'Extra summary'
    get '/' do
      'Extra content'
    end
  end
end

class Api < Sinatra::Base
  extend DocMyRoutes::Annotatable

  summary 'Api summary'
  get '/' do
    'API content'
  end
end

url_map = ::Rack::URLMap.new({ '/api' => Api.new, '/extra' => Extra::Api.new })

DocMyRoutes.configure do |config|
  config.title = "My Application"
  config.destination_dir = '/tmp/doc_my_routes/'
end

DocMyRoutes::RouteCollection.log_routes

DocMyRoutes::Documentation.generate

Closed by @vaneyckt's hijack in #13


updater fixes: user + add -p support

What does this PR do?

add pid in a file following the same pattern as other datadog agents. Updater package currently crashes on -p support
add /opt/datadog-packages
fix dd-user to dd-updater

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


osc52 support

when in an ssh session, you typically don't have access to system/x11 clipboards
but you can use built-in terminal emulator codes to copy things into your system clipboard via osc52
a plugin that tells nvim to use osc52:
https://github.com/ojroques/nvim-osc52
in this case, i would like to be able to first yank into yanky, and then output the osc52 code (chaining on to nvim-osc52) to push the same yanked text into my system clipboard

Since this commit you can use osc52 as clipboard directly in Neovim nightly.
Can you try with this config and send me feedback:
    vim.g.clipboard = {
      name = 'OSC 52',
      copy = {
        ['+'] = require('vim.clipboard.osc52').copy,
        ['*'] = require('vim.clipboard.osc52').copy,
      },
      paste = {
        ['+'] = require('vim.clipboard.osc52').paste,
        ['*'] = require('vim.clipboard.osc52').paste,
      },
    }

If it works, we could add a section in the readme :)


test/helpers.bash: assert handle corner cases correctly

Right now assert t:[1] != t:[1] passes. This is obviously incorrect
and some test might not be working correctly because of this. We have to
special case this like the "==" case.
I discovered this in buildah, since we use the same logic here we should
fix it to prevent unexpected bugs.

LGTM

/lgtm


Allow relative fallback paths

Maintainer of rocky-linux/rockylinux.org here.
We're going to be moving our stuff from Vercel to a hosted instance of this tool, but one feature this seems to be missing that we needed from it has been routers.
In our repo, the file vercel.json contains this block:
  "routes": [
    { "handle": "filesystem" },
    { "src": "/zh-cn/(.*)", "status": 404, "dest": "/zh-cn/404.html" },
    { "src": "/zh-hk/(.*)", "status": 404, "dest": "/zh-hk/404.html" },
    { "src": "/fr/(.*)", "status": 404, "dest": "/fr/404.html" },
    { "src": "/de/(.*)", "status": 404, "dest": "/de/404.html" },
    { "src": "/es/(.*)", "status": 404, "dest": "/es/404.html" },
// ...
    { "src": "/(.*)",    "status": 404, "dest": "/404.html" }
  ],

All this basically does is tell Vercel to read from the filesystem, then fall back onto a number of static pages depending on where the user attempted to browse to. Basically, --fallbackAssetPath based on the current route.
If this could be implemented in StaticDeploy, it would seriously help us switch.
At the moment, we'd be forced to create multiple bundles with different fallback paths, which just is not feasible for the setup we want (automatic branch-based deployments and review deployments for PRs).

Hello @hbjydev , nice, happy to hear that! Yes, at the moment the fallback asset feature does not support a dynamic path/status code, but it shouldn't be too disruptive to implement it. I'll mark this as a feature request and I'll update you if/when I start implementing it.


[error] Unable to determine the framework type for @capacitor/barcode-scanner

I had run the command :
npm install @capacitor/barcode-scanner
but the output windows always show:
[error] Unable to determine the framework type for @capacitor/barcode-scanner
I run the command:
npx cap sync
The terminal show the error:
npm error could not determine executable to run
Does someone know how to solve those problems?

@capacitor/barcode-scanner install no problem but...
% npm install @capacitor/barcode-scanner

removed 19 packages, changed 5 packages, and audited 571 packages in 3s

76 packages are looking for funding
  run `npm fund` for details

5 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

But "npx cap sync", it still appears  the error
npm error could not determine executable to run

I had solved this problem by the command of "sudo to npm install and barcoae scanner".


Load all menuView at once

hey,
Swipe menu load all menuView at once. if you have more than 5 view your app is waiting to add these views. It has a really bad performance effect. Is there any solution for it ?

is there any progress? I am facing same issue when loading 7 views.

Hi Any solution for this?


Add quickstart sample for Java

Adding new code sample to pull snippets from for Blob Storage Java quickstart.

@tamram @normesta In case either of you would like to review this. I plan to pull snippets from here when I modify the blob Java quickstart.


built-in bundles in workerd config

#413 adds wrapped binding, but the intent is to enable
those only to builtin modules. However there's no easy way to extend builtins in already built workerd.
This change adds builtins field to worker configuration with the list of bundles to provide. These modules will be registered (but not initialized) during compileModules.
Another usage for builtins could be private bindings/modules with full sources not in workerd, but still available in local development through the use of builtins.

Do you think this should be rather configured on a server level instead? @jasnell @kentonv

Do you think this should be rather configured on a server level instead?

I think so, here's why:
Someday, we'd like to find a way that these built-in modules can be compiled once and shared across isolates. Maybe lightweight isolate cloning will make this possible, or maybe some other mechanism. Having built-in-like modules that are actually specific to one isolate may become more painful to maintain at that time.

I have moved builtins to the global Config level. PTAL.
Let me know if you want me to introduce struct SharedWorkerConfig in workerd.capnp @kentonv

all comments addresses, thank you for review, merging.


remove useless id: fa

@KevinZonda : Thanks for your contribution! The author(s) have been notified to review your proposed change.

I agree that the id isn't required for the examples in this article. Thanks for the PR. #sign-off

#sign-off


Unable to Authenticate Wrangler in any Remote Development Environment

https://developers.cloudflare.com/workers/wrangler/commands/#using-wrangler-login-on-a-remote-machine outlines how to authenticate the Wrangler CLI when using a remote development environment (e.g. Codespaces).
However it doesn't seem to work. The original shell always puts out this error message at the end
Received query string parameter doesn't match the one sent! Possible malicious activity somewhere.

I've seen this on Gitpod, Codespaces, Stackblitz, and Codesandbox so far so I don't think it's specific to any of them.
Is there an alternative form of authentication that could be used in the meantime? I haven't gotten api key-based authentication to work either

My assumption is this has something to do with either Proof of Key Code Exchange (PKCE) and/or state for Cross Site Request Forgery (CSRF) protection, where after I authenticate via the UI, my local browser has something that running curl on the remote machine doesn't

Yeah it's state https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/user/user.ts#L636

Afaict the state is always a query parameter on the redirect URL from the Identity Provider (Cloudflare) and it matches what was sent initially by wrangler (the Referring Provider)

Not sure what I did differently this time but following this code https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/user/auth-variables.ts#L14 I was able to do
export CLOUDFLARE_API_TOKEN=<API token generated from the Edit Workers template>
npx wrangler whoami

And that appears to have worked
Still not clear to me why the OAuth2 flow isn't working

It sounds like you've got this working with API tokens? That's what we'd recommend for environments like Stackblitz and Codespaces. The remote machine authentication flow should work though (or should be removed from the docs), and so I'll leave this open to track investigating that.

It sounds like you've got this working with API tokens?

Correct yeah, I think I found a comment on a closed issue that clued me in to trying that, and it's worked so far

Seems D1 database is not (yet) supported by API Token.
✘ [ERROR] A request to the Cloudflare API (/accounts/xxxxxx/d1/database) failed.

  Authentication error [code: 10000]

wrangler login with manual curl on the localhost redirection doesn't work...
Received query string parameter doesn't match the one sent! Possible malicious activity somewhere.

@Grunet
Thank you for writing this issues,
I also was having the same issue until I found a simple way to communicate between the remote development environment and the local in browser account page of cloudflare
So how it works is basically you are doing the same steps no change in that,

wrangler login
https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=<Your-Client-Code>&state=<Your-State-Token>&code_challenge=<Your-Challenge-Token>&code_challenge_method=S256&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread+user%3Aread+workers%3Awrite+workers_kv%3Awrite+workers_routes%3Awrite+workers_scripts%3Awrite+workers_tail%3Aread+zone%3Aread+offline_access
You open the secure link in the browser where you have cloudflare account logged in.
Note :  Cloudflare Auth after successful authorization will redirect you to the following query string redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread+user%3Aread+workers%3Awrite+workers_kv%3Awrite+workers_routes%3Awrite+workers_scripts%3Awrite+workers_tail%3Aread+zone%3Aread+offline_access
After a successful you will have be redirected to the page http://localhost:8976/oauth/callback?code=<Your-Auth-Code>&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20zone%3Aread%20offline_access&state=<Your-State-Token>
Well, to no surprise this page will not work in your current browser window as the origin is the remote development environment which is not accessible as localhost.
What can be done next is pretty the main stream principle of using curl internally for testing APIs in development servers.
So change the localhost to <IP_ADDRESS> or what ever your *inet* is there before subnet mask. [To get the details of internal networking use command ip addr, usually it is <IP_ADDRESS> if nothing is changed from defaults]
Now your callback url should look like  http://<IP_ADDRESS>:8976/oauth/callback?code=<Your-Auth-Code>&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20zone%3Aread%20offline_access&state=<Your-State-Token>
Now open a new bash terminal or powershell or Terminal(macOS terminal)  and use the command curl "<your-callback-url>" #### the callback url is the one we made in the 10th point.
Voila! you are now logged in.
Remember to fill in the details in the boilerplate url schema

hi @Grunet :) sounds like you've got things working and that @mishra-saksham is able to get the the remote machine authentication flow (https://developers.cloudflare.com/workers/wrangler/commands/#use-wrangler-login-on-a-remote-machine) going (thanks for the write up!). given this, i will close the issue now, thanks both!

Thanks for sharing, I tried and curl could connect and send its GET request:
*   Trying <IP_ADDRESS>:8976...
* connect to <IP_ADDRESS> port 8976 failed: Connection refused
*   Trying ::1:8976...
* Connected to localhost (::1) port 8976 (#0)
> GET /oauth/callback?code=[redacted]
> Host: localhost:8976
> User-Agent: curl/7.81.0
> Accept: */*

but wrangler login replied with:
/home/[redacted]/node_modules/wrangler/wrangler-dist/cli.js:29573
            throw a;
            ^

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (/home/[redacted]/node_modules/wrangler/wrangler-dist/cli.js:5121:19)
    at successSteps (/home/[redacted]node_modules/wrangler/wrangler-dist/cli.js:5092:27)
    at fullyReadBody (/home/[redacted]/node_modules/wrangler/wrangler-dist/cli.js:3590:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async specConsumeBody (/home/[redacted]/node_modules/wrangler/wrangler-dist/cli.js:5101:7)
    at async exchangeAuthCodeForAccessToken (/home/[redacted]/node_modules/wrangler/wrangler-dist/cli.js:120821:31)
    at async Server.<anonymous> (/home/[redacted]/node_modules/wrangler/wrangler-dist/cli.js:120983:30)

Node.js v20.12.1

wrangler version: ⛅ wrangler 3.51.2

API token generated from the Edit Workers template

where did u git "API token generated from the Edit Workers template" from?

API token generated from the Edit Workers template

where did u git "API token generated from the Edit Workers template" from?

@thewaleed Go to My Profile > API Tokens > Create Token > Use Template for "Edit Cloudflare Workers"

Had this same issue and resolved it by forwarding port 8976 to my local machine when ssh-ing to the remote environment.

Still the same issue with 3.78.3 tried:

https://developers.cloudflare.com/workers/wrangler/commands/#use-wrangler-login-on-a-remote-machine
forwarding the port

adding on to mishra's explanation, I had to change the host from localhost to [::1] instead of <IP_ADDRESS> in order for it to succeed. Using localhost gave me an invalid query string error, and using <IP_ADDRESS> curl failed to connect. It seems wrangler may be listening on ipv6 specifically in some cases and using locahost for that case somehow causes verification to fail, maybe the http host header is involved somehow? I don't know enough to speculate past that.

Not sure what I did differently this time but following this code https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/user/auth-variables.ts#L14 I was able to do
export CLOUDFLARE_API_TOKEN="API token generated from the Edit Workers template"
npx wrangler whoami

And that appears to have worked
Still not clear to me why the OAuth2 flow isn't working

that is by far the most straight forward route, thanks! (using .devcontainer)

Can we please reopen this issue? Headless login still is not directly supported and instead must rely on workarounds (those in this thread and the official docs), the workarounds in the official documentation do not work for all the people commenting in this issue (nor for me). And to top it all off, for me none of the following work:

Official docs suggest to curl the localhost redirect -> Received query string parameter doesn't match the one sent! Possible malicious activity somewhere.
export CLOUDFLARE_API_TOKEN="API token generated from the Edit Workers (or equivalent) template" -> wrangler in some cases treats me as logged in and in others does not. Did not actually allow me to complete uploading to cf pages
curl http://<IP_ADDRESS>:8976/... or equivalent instead of localhost -> Failed to connect to <IP_ADDRESS> port 8976 after 0 ms: Connection refused
curl http://[0:0:1]:8976/... or equivalent instead of localhost -> Received query string parameter doesn't match the one sent! Possible malicious activity somewhere.

Please can the wrangler team add better support for headless logins so that we don't need to follow these workarounds? I have never had a problem logging into the GCP CLI in a remote machine, and I don't think modifying wrangler to use a similar flow would be too difficult. Right now you essentially do not support headless logins with a stable interface that works across reasonably standard dev environment.
If you wanted to take the approach gcloud took, clientside you can add a login arg npx wrangler login --headless that generates a clickable link with a url param indicate the user is headless, and then waits for the user to paste in a token. Serverside you can read that headless arg and, when set, redirect to a page displaying the token (and whatever else you need wrangler to know to complete the login) for the user to copy back to wherever they are logging in (instead of a localhost url). That's how gcloud login works and it's perfectly functional, and not a huge change from what you have already.

One possible cause could be bash/sh/etc interpreting special characters in the url, causing a modified url to be passed to curl instead of what is shown on the command line. I just signed in using the exact url successfully by putting quotes around it.

One possible cause could be bash/sh/etc interpreting special characters in the url, causing a modified url to be passed to curl instead of what is shown on the command line. I just signed in using the exact url successfully by putting quotes around it.

This worked for me with Codespaces.  Experience is shocking though.


Revert "Various Fixes & Encounter Tab Overhaul"

Reverts coveleski/rb_tracker#53

#53 Reverting this because this kitchen-sink PR merged a lot of stuff all at once without opportunity for any review or testing, and parts of it are messy and possibly buggy.


0.5.1 in unity 5 no light rendering on floor with tiled material and compressed when using uvw repeated textures

Samsung I9505 Galaxy S4
whats causing the compression?
any other suggestions for creating a tiled texture that receives light?

Does this also happen if you turn off VR Mode?

no only in vr mode i get compression

Can you post a screenshot of it with VR Mode turned off, for comparison?

Wow, very interesting.  BTW, which version of Unity are you using?  I can try to reproduce it.

cool its 5.0.2.f1

the floor from the screenshots is 26 triangles with repeated uvw and material tiling 1,1, ive created a unity package with the floor https://drive.google.com/file/d/0B1Q-jiCG2F79Qi1hX0N5bndqR3c/view?usp=sharing

I tried your package in Unity 5.1.1, with the build platform set to Android.  Seems OK, but maybe I don't have all the same settings you did.  Here's a screenshot.  Did you see this in the editor or on the phone?

yes no probs in editor or windows build but on my android Samsung I9505 Galaxy S4, tested on my samsung galaxy tab 2 now which has no compression, i will keep you updated

no compression with unity 5.1.2 and reinstalled windows, so prob solved :D

OK, I'll close the issue.


Suggestion for improvement in the symbols

I noticed that CAKE DEFI and DeFi Wallet use conflicting symbols.

Inflowing capital is marked on CAKE with an arrow pointing upwards. Outflowing capital with an arrow pointing downwards.

In DeFi Wallet it is the other way around. Inflowing capital is marked with an arrow pointing down. Outflowing capital is marked with an arrow pointing upwards.
Even though CAKE and the DeFi app are two different things, I would recommend using a consistent standard.
Further, I would refrain from showing send and receive separately if it was just a wallet internal transaction.

My suggestion how this transaction could be displayed:

Hi @RobinTorque , thanks for your feedback.


Small Bugs with Ring of Shadows

I can't reopen my previous Ring of Shadows Issue so I decided to make a new one:
If you left click the right of shadows teleport "The" is not colored in "The DT2 Vault"
Also would it at all be possible to make the color change when hovering over the options?
https://github.com/LlemonDuck/easy-teleports/assets/7264387/4e0ea297-e261-4176-8810-83d59e4ac2ee

I see. I can definitely fix the uncoloured "The".
Having colour changes on hover is a broader thing that none of the replacements have at the moment. The <col tags override the typical hover behaviour of changing to white. I can probably figure something out to make it work though. Moved that part of the issue to #16


[TESTS] add tests for CLI

Is your feature request related to a problem? Please describe
The entire cli.py module is not covered by any tests. It is important to test the parser behaviour and the expected outputs to ensure that the CLI does not break.
Describe the solution you'd like

Refactor the CLI cli.main() function to accept a list of arguments as input instead of taking the args from sys.argv directly. (reference)
A new module under tests/ named test_cli.py that contains test functions/classes for the CLI.
Ensure that the tests run and pass.

Hi, I'd like to take on this Issue as part of Hacktoberfest if that is okay and it is not already assigned to someone externally. Would you be happy to assign me, and accept my contribution as a Hacktoberfest PR should I manage to put in a PR that closes it?
If so, the summary here is very clear so I understand exactly what is wanted. Just to check one aspect though, based on the reference in the comment, it seems you want a solution for the refactor based on the argparse module. Is that correct?
Thanks.

Hi, I'd like to take on this Issue as part of Hacktoberfest if that is okay and it is not already assigned to someone externally. Would you be happy to assign me, and accept my contribution as a Hacktoberfest PR should I manage to put in a PR that closes it?

@sadielbartholomew Hi. Sure! Thank you.

If so, the summary here is very clear so I understand exactly what is wanted. Just to check one aspect though, based on the reference in the comment, it seems you want a solution for the refactor based on the argparse module. Is that correct?

Yes, that is correct. The CLI code uses the argparse module.

Thanks @Samyak2. I expect to be able to put in a PR for this by the end of this weekend, possibly sooner. If I am otherwise busy so that it ends up taking longer I will let you know.

Sure, no hurries.

@sadielbartholomew any updates?

Hi, I ended up being busier than I expected, but I will prepare the PR over the weekend and put it in on Monday. I will still get it done. Sorry for the delay,.

@sadielbartholomew no issues. Just wanted to know if you were still doing it.
Thank you.

Hi, just to update you, I will be a bit later still with this but I shouldn't take longer than a couple more days to get the PR up. Mainly I am late with it because when I started working on it yesterday I got distracted with some test failures (as raised in #90).

Hi again, just to provide an update, I've missed the chance to complete the PR for this for Hacktoberfest because I was busier than I thought over the weekend, but I still plan to address it.
The unit test is done, so I just need to do the refactor of the CLI to us argparse and I am not far from finishing that. However, I am very busy until tomorrow afternoon (my time, UK) so it will be towards the end of the working week when I can put in the PR. I hope that is okay. Sorry for the delay. Thanks.

That is okay. Thank you for updating

Any updates?
I wanted to have these tests ready for the 0.3.0 release. So if you have any progress on this, feel free to open a draft PR so I can take a look and contribute to it.

Ah, very sorry @Samyak2 this fell off my radar. I'll try to finish tonight but regardless I will put up a PR, draft or otherwise. Thanks.


Add human-readable displayException output for fatal exceptions

When such exceptions shut down the node, the output of displayException (in
addition to the detailed output of show) will be shown to the user.

This will be used by https://github.com/input-output-hk/cardano-node/pull/365.

bors r+


GROOVY-10983: Bump asm to 9.5, add JDK21 constant

Codecov Report

Merging #1880 (b5cc733) into master (d883646) will decrease coverage by 0.0473%.
The diff coverage is 100.0000%.

@@                Coverage Diff                 @@
##               master      #1880        +/-   ##
==================================================
- Coverage     68.1045%   68.0572%   -0.0473%
- Complexity      28640      28662        +22
==================================================
  Files            1427       1428         +1
  Lines          113179     113337       +158
  Branches        19359      19372        +13
==================================================
+ Hits            77080      77134        +54
- Misses          29606      29699        +93
- Partials         6493       6504        +11

Impacted Files
Coverage Δ

...codehaus/groovy/control/CompilerConfiguration.java
76.4120% <100.0000%> (+0.0786%)
:arrow_up:

... and 18 files with indirect coverage changes

+1

Merged. Thanks.


Add kunalmohan to try users

I will be working on WebGPU CTS and having "try" permissions will be quite helpful.

Filed https://github.com/servo/saltfs/issues/1003 about the CI failures.

Try changing https://github.com/servo/saltfs/blob/90036502c8fac2291fba372b3309bafef605f5b2/salt/common.sls#L6-L8 as well.

Some success, but still 2 failures

I fail to understand why some tasks return gpg: no valid OpenPGP data found. and others Ok

@bors-servo r+

:pushpin: Commit af9d6b4 has been approved by jdm

:hourglass: Testing commit af9d6b4dfcb084d7472b6a28f1a81941091d18f0 with merge 29a06798b67ee7f3cb7897a3752117dc4ccc86ec...

:broken_heart: Test failed - checks-travis

Ok, I figured out why those two jobs are failing - the URLs for the archived salt versions don't include the patch release. I'm going to try upgrading us to a non-archived version instead in #1004.

@bors-servo retry

@bors-servo r+

:pushpin: Commit c91daf2 has been approved by jdm

:hourglass: Testing commit c91daf2c70acc1dbb781d3d6bb2ddbfd3149ee42 with merge 4cbef3b82b66592d3d59f190593ae5fc4a53e099...

:sunny: Test successful - checks-travis
Approved by: jdm
Pushing 4cbef3b82b66592d3d59f190593ae5fc4a53e099 to master...

This change has been deployed; you should be able to use try commands now.


Wrong array shape when using single crosslink record

Input with a single crosslink record is not reshaped properly at this line
https://github.com/lhatsk/AlphaLink/blob/0557e6fe2b281b3ae6ec43711ab43825cc9d0bd4/predict_with_crosslinks.py#L288
Instead of
    if len(links.shape) == 0:         links = np.array([links])
it should be
    if len(links.shape) == 1:         links = np.array([links])

Thanks for pointing this out! It's fixed now.


vedic, sanskrit Typeface

[Enter feedback here]
https://www.linkedin.com/feed/update/urn:li:activity:7065738556928892928/
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 1198929e-67b2-8442-c623-7e1325712c6a
Version Independent ID: 47fa7093-96e1-effa-2157-f07d00e2d7c4
Content: Sanskrit Text font family - Typography
Content Source: typographydocs/font-list/Sanskrit-Text.md
Product: typography
GitHub Login: @v-nihar
Microsoft Alias: alib

https://www.linkedin.com/feed/update/urn:li:activity:7065738556928892928/

What is exactly it that you’re requesting Microsoft Typography do?

No actionable feedback.


gorm.io certificate error

Hi
I just wanted to mention that the SSL certificate for gorm.io is invalid!
Regards

+1 for this. I suggest enabling https on gorm.io due to safety concerns and compliance with web standards.

Done, thank you for your report.


Suggestion: make the API for basic drawing more prominent/discoverable

Thanks so much for a great UI library!
I just wanted to share an actionable bit of my new user experience. While looking up how to do basic drawing (lines, circles, etc...), I initially went down the wrong path and started using the Plot API. I forget the exact sequence of what I looked at, but I think I searched the issue tracker for geometry related keywords and your recent work on Plot swamped the results. I eventually got back on (what I think is) the right track, i.e. using ui.allocate_painter, the Painter API, egui::Shape, etc... starting from code deep in the drawing demo code, but maybe that can made more discoverable somehow. Maybe just some additional text in the docs, or maybe a simpler "basic drawing" pane in the demo. If you have an idea how you'd want it done, I can take a crack at a MR.

Good feedback!
I think adding a section with examples to the crate level docs would be a good idea.
There are already a few demos using the painter functionality, including the demo called "Painting". I'm not sure how to make it much more prominent than that :)

Yeah... nevermind; the demos are ample. Painter was in fact the demo that got me back on the right direction. Fractal clock in the demo is also doing a lot of line drawing.