iOS + Hermes, Error: Font failed to load (generatorResume)

[X] Review the documentation: https://github.com/oblador/react-native-vector-icons
[X] Search for existing issues (including closed issues): https://github.com/oblador/react-native-vector-icons/issues

Environment
iOS 16
"react-native-vector-icons": "9.2.0",
react-native: 0.70.3

Description
When building an iOS version with Hermes enable, the app crashers at startup:
Error: Font failed to load
  at apply(node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:105:55)
  at ? (node_modules/react-native-vector-icons/lib/create-icon-set.js:175:13)
  at generatorResume([native code])
  at asyncGeneratorStep(node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:20)
  at _next(node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
  at fn(node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7)
  at tryCallTwo(node_modules/promise/setimmediate/core.js:45:5)
  at doResolve(node_modules/promise/setimmediate/core.js:200:13)
  at Promise(node_modules/promise/setimmediate/core.js:66:3)
  at apply(node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:16)
  at _loadFont(node_modules/react-native-vector-icons/lib/create-icon-set.js:26:3)
  at loadFont(node_modules/react-native-vector-icons/lib/create-icon-set.js:26:3)
  at ? (src/App.js:312:12)
  at generatorResume([native code])
  at asyncGeneratorStep(node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:20)
  at _next(node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
  at fn(node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7)
  at tryCallTwo(node_modules/promise/setimmediate/core.js:45:5)
  at doResolve(node_modules/promise/setimmediate/core.js:200:13)
  at Promise(node_modules/promise/setimmediate/core.js:66:3)
  at apply(node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:16)
  at _init(src/App.js:100:21)
  at init(src/App.js:100:21)
  at ? (src/App.js:622:11)
  at generatorResume([native code])
  at asyncGeneratorStep(node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:20)
  at _next(node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
  at fn(node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7)
  at tryCallTwo(node_modules/promise/setimmediate/core.js:45:5)
  at doResolve(node_modules/promise/setimmediate/core.js:200:13)
  at Promise(node_modules/promise/setimmediate/core.js:66:3)
  at apply(node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:16)
  at _componentDidMountAsync(src/App.js:100:21)
  at componentDidMountAsync(src/App.js:100:21)
  at create$73(src/App.js:143:5)
  at commitHookEffectListMount(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:5828:26)
  at flushPassiveEffects(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7532:23)
  at d(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7371:7)
  at J(node_modules/scheduler/cjs/scheduler.production.min.js:13:203)
  at R(node_modules/scheduler/cjs/scheduler.production.min.js:14:128)
  at callback(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:248:18)
  at _callTimer(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:112:7)
  at _callReactNativeMicrotasksPass(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:162:5)
  at _reactNativeMicrotasksCallback(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:413:12)
  at __callReactNativeMicrotasks(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:390:12)
  at fn(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:132:12)
  at __guard(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:367:9)
  at value(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:131:10)
  at value([native code])
  at value([native code])

Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve
import Icon from 'react-native-vector-icons/FontAwesome';
import EntypoIcon from 'react-native-vector-icons/Entypo';
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';

We aren't using Hermes, but hitting this as well. Only apparent on iOS16 according to our crash logs. Also on 9.2.0, but on RN69.
Error: Font failed to load
  at apply(node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:106:55)
  at call(node_modules/react-native-vector-icons/lib/create-icon-set.js:176:13)
  at tryCatch(node_modules/regenerator-runtime/runtime.js:63:40)
  at call(node_modules/regenerator-runtime/runtime.js:294:22)
  at tryCatch(node_modules/regenerator-runtime/runtime.js:63:40)
  at invoke(node_modules/regenerator-runtime/runtime.js:155:20)
  at fn(node_modules/regenerator-runtime/runtime.js:190:11)
  at tryCallTwo(node_modules/promise/setimmediate/core.js:45:5)
  at doResolve(node_modules/promise/setimmediate/core.js:200:13)
  at Promise(node_modules/promise/setimmediate/core.js:66:3)
  at callInvokeWithMethodAndArg(node_modules/regenerator-runtime/runtime.js:189:20)
  at next(node_modules/regenerator-runtime/runtime.js:212:13)
  at async(node_modules/regenerator-runtime/runtime.js:239:14)
  at loadFont(node_modules/react-native-vector-icons/lib/create-icon-set.js:170:3)
  at factory(node_modules/react-native-dropdown-picker/src/index.js:14:9)
  at loadModuleImplementation(node_modules/metro-runtime/src/polyfills/require.js:339:5)
  at factory(App/Components/Forms/select.js:4:1)
  at loadModuleImplementation(node_modules/metro-runtime/src/polyfills/require.js:339:5)
  at factory(App/Components/Forms/index.js:2:1)
  at loadModuleImplementation(node_modules/metro-runtime/src/polyfills/require.js:339:5)
  at guardedLoadModule(node_modules/metro-runtime/src/polyfills/require.js:200:21)
  at Component(App/Components/Modules/LoadTicket/stepTicketInfo.js:154:12)
  at renderWithHooks(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:3360:13)
  at updateFunctionComponent(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:4297:15)
  at performUnitOfWork(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6771:14)
  at workLoopSync(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6764:37)
  at renderRootSync(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6746:7)
  at performSyncWorkOnRoot(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6454:20)
  at Ea([native code])
  at flushSyncCallbacks(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:2058:23)
  at scheduleUpdateOnFiber(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6211:42)
  at jr(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:3829:14)
  at jr([native code])

I have the same issue, but I'm not using hermes.
WARN  Possible Unhandled Promise Rejection (id: 0):
Error: Font failed to load

I have the same issue, but I'm not using hermes.
WARN Possible Unhandled Promise Rejection (id: 0):
Error: Font failed to load

Same here.
System:
Binaries:
Node: 16.18.0
Watchman: 2<IP_ADDRESS>
npmPackages:
react: 18.2.0 => 18.2.0
react-native: 0.69.6 => 0.69.6

Same. I spent hours trying to troubleshoot this issue and got no where. Even if you async await the fontLoad() the Unhandled Promise Rejection still displays.

Same here :(
Is there any known resolution? While the icons are loading, it's killing our sentry quota 😞
react-native: 0.68.5
react: 17.0.2
react-native-vector-icons: 8.1.0

I did some debugging and it looks like the error occurs when trying to register the font (triggered by loadFont). The error is error	__NSCFError *	domain: @"com.apple.CoreText.CTFontManagerErrorDomain" - code: 305	0x0000600002a667c0. Not sure why this is happening, but considering the images are still working I think it would be fine to add || kCTFontManagerErrorDuplicatedName to the conditional on l:166 of RNVectorIconsManager as a short term fix for now

You can use this workaround to suppress the warnings:
Icon.loadFont().catch((error) => { console.info(error); });

Instead of having the useless warning in the yellow box, it will now print it to the console only. The icons still load fine with this.

I have the same issue, but I'm not using hermes.
WARN Possible Unhandled Promise Rejection (id: 0): Error: Font failed to load

any luck..?

@tsukudabuddha 's solution worked for me:
diff --git a/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m b/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m
index 2823543..2c49d26 100644
--- a/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m
+++ b/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m
@@ -163,7 +163,7 @@ - (NSString *)createGlyphImagePathForFont:(NSString *)fontName
     CFErrorRef errorRef = NULL;
     if (CTFontManagerRegisterGraphicsFont(font, &errorRef) == NO) {
       NSError *error = (__bridge NSError *)errorRef;
-      if (error.code == kCTFontManagerErrorAlreadyRegistered) {
+      if (error.code == kCTFontManagerErrorAlreadyRegistered || error.code == kCTFontManagerErrorDuplicatedName) {
         resolve(nil);
       } else {
         reject(@"font_load_failed", @"Font failed to load", error);

I test this issue with a bare new RN project.
This issue occurs when the react-native app runs on iOS 16 or above, affecting both simulator and physical device. iOS 15.X works fine.
The rn-vector-icons version in my project:
"react-navtive-vector-icons": "9.1.0",
"react": "17.0.2",
"react-native": "0.66.4",

@tsukudabuddha 's solution worked for me:
diff --git a/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m b/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m
index 2823543..2c49d26 100644
--- a/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m
+++ b/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m
@@ -163,7 +163,7 @@ - (NSString *)createGlyphImagePathForFont:(NSString *)fontName
     CFErrorRef errorRef = NULL;
     if (CTFontManagerRegisterGraphicsFont(font, &errorRef) == NO) {
       NSError *error = (__bridge NSError *)errorRef;
-      if (error.code == kCTFontManagerErrorAlreadyRegistered) {
+      if (error.code == kCTFontManagerErrorAlreadyRegistered || error.code == kCTFontManagerErrorDuplicatedName) {
         resolve(nil);
       } else {
         reject(@"font_load_failed", @"Font failed to load", error);

Creating a patch file with the above changes worked for my project, thanks!

createGlyphImagePathForFont in 9.2.0 is different than in the diff.


Updates ComponentOptions type to include beforeUnmount and unmounted lifecycle hooks

What kind of change does this PR introduce? (check at least one)

[X] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[X] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[X] It's submitted to the dev branch for v2.x (or to a previous version branch), not the master branch
[X] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[X] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
[X] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
These hooks didn't appear to be intentionally left out of the ComponentOptions type.

Thanks but in vue 2, they are named destroyed and beforeDestroy


[Workflow] MWPW-134543 Dispatch DC workflow when main is changed

It creates a workflow dispatch to DC repo when there is a change to main
DC repo will trigger necessary tests to ensure the change in Milo doesn't break DC pages
Will add PRs later when shift-left is needed
Other consuming teams can add their dispatches to jobs

Resolves: MWPW-134543
Test URLs:

N/A

Cool, do you think other consumers would benefit from this as well?

Yes, if they want to do some actions or tests in their repo when Milo is changed. They can add a workflow dispatch in this script.


Adds CdnHelper

This PR is a starting point for solving the feature requested in #42. If the direction is acceptable I will start rounding up. I have chosen a very simple CdnHelper:

cdn assets are only used if the helper is loaded
one can use the same logic in custom layouts
default configuration settings should be both low-maintenance and allow easy user overrides if different URLs are needed

@ADmad thanks for the comment.
If this is an acceptable approach I will add some tests and PHPCS fixes.

Can I take these constructive comments as a yes, this solution is acceptable :wink:

@bravo-kernel, short answer, no. But please read as I really appreciate the effort and think I owe an explanation.
While I was looking at the code, I started writing comments. I am copy/pasting the one I was leaving and which kinda turned my opinion around:

Not a fan of hardcoding it (and supporting it) here. Instead, I would suggest adding instructions for people that wish to use the CdnHelper on what lines need to be changed.

This was on the layout file changes.
When I wrote this, I realized that all this CDN thing should only be in the docs. A lazy person who will have to read the docs to know of the CdnHelper would only have to copy 2 lines and replace the ones included by default with the template.
For maintainers, this would mean only having to update that version part of the paths when new releases are out and would keep the code base lighter (not that it was adding a lot) but most importantly, a good reference to send users to when asking about how to do stuff with CakePHP. Adding bloat and such trivial functionality in a helper promoted by FriendsOfCake won't help.
All that been said, I still hope you'll make the changes to the README to help the lazy use the CDN solution :wink:

ok, fair enough, no problem, at least I learned something about Helpers along the way :smiley:


ci: update winmd.yml

Description

Related Issue

Type of Change

[ ] 🚀 feat — New feature (non-breaking change which adds functionality)
[ ] 🛠 fix — Bug fix (non-breaking change which fixes an issue)
[ ] ❌ ! — Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🧹 refactor — Code refactor
[x] ✅ ci — Build configuration change
[ ] 📝 docs — Documentation
[ ] 🧪 test — Test
[ ] 🗑 chore — Chore

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.64%. Comparing base (47045b8) to head (0c1da5a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   89.76%   94.64%   +4.88%
==========================================
  Files          31       59      +28
  Lines        1407     4447    +3040
==========================================
+ Hits         1263     4209    +2946
- Misses        144      238      +94

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


dllexport for Booster and other classes

Is there an interest in exporting classes such as Booster, ObjectiveFunction, Dataset and other classes/functions?
I am writing code that deals with those classes directly and needs them exported, which for Windows needs adding the dllexport decl. I can create a PR with the changes if there's interest of having this in the LightGBM upstream repo.

Sure, any PR is welcoming. Porting these classes would contributed to the customization in the binding language.

Fixed with https://github.com/Microsoft/LightGBM/pull/203


Quick application login powerpoint and word .

The application is very good but I will make a request .Add icons to the desktop to quickly access powerpoint and word applications.

Sorry, but I don't think so it's possible yet.


Improve where docstring

[x] Passes isort -rc . && black . && mypy . && flake8
[x] Fully documented, including whats-new.rst for all changes and api.rst for new API

The x, y  doesn't carry over to the online docs: http://xarray.pydata.org/en/stable/generated/xarray.where.html#xarray.where, lmk if there's a hack for representing that in a better way

Ready


Delete old instance?

Hello,
i´ve changed an instance from ragnarok.cfg to center.cfg. but when i list the instances, i will see @ragnarok and @center.
how can i delete the instance @ragnarok?

Check that you don't still have configfile_ragnarok=... in either /etc/arkmanager/arkmanager.cfg or ~/.arkmanager.cfg, and that neither /etc/arkmanager/instances/ragnarok.cfg nor ~/.config/arkmanager/instances/ragnarok,cfg exist.

Thats it. i´ve changed the path but not the name. thanks a lot...


Set second argument of split to val

According to the "Supported Functions" section of the
docs (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-split.html),
the second argument to Split doesn't have to be a string literal and
can instead be a function. The delimiter must be a string literal.
Fun note: this wackiness is needed to be able to prepend/append values
to a List type parameter.

Woah. I'm starting to dogfood this and I'm not sure how it could be something I did but the output JSON is producing toplevel keys eResources and eParameters instead of Resources and Parameters. I'm guessing some metaprogramming thing is not dropping enough prefix.

I'm going to merge #73 into this branch so I can proceed on my project but feel free to merge #73 before this one.

Thanks for the fix!


no.png

I'm trying to unify the X mark.

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

Good one!

#sign-off


WrapperTask triggers many unnecessary complete() calls

Description
To determine completeness of WrapperTask, the complete() method has to be called on its dependencies.
Because a scheduler is not aware of this check, it will call the complete() method on the dependencies for the second time.
And when check_unfulfilled_deps is enabled (default), Luigi calls the complete() method on all dependencies for the third time.
When a wrapper task with 99 complete dependencies and 1 incomplete, this can result in 300 completeness checks.
This problem is multiplied if we build a hierarchy of wrapper task because all WrapperTask.complete() calls have to bubble to leaf tasks. For example consider a hierarchy of three wrapper tasks:

import luigi
import luigi.mock

class Dep(luigi.Task):
    def output(self): return luigi.mock.MockTarget("inner.txt")
    def run(self): self.output()._touchz()
    def complete(self): print("complete?"); return super().complete()

class BottomWrapper(luigi.WrapperTask):
    def requires(self): return Dep()

class MiddleWrapper(luigi.WrapperTask):
    def requires(self): return BottomWrapper()

class TopWrapper(luigi.WrapperTask):
    def requires(self): return MiddleWrapper()

Running the TopWrapper from the example results in 7 calls to Dep.complete().
Proposed solution
From my experiments, it seems that I can replace Luigi WrapperTask by the following PhonyTask:
class PhonyTask(luigi.Task):

    _complete = False

    def run(self):
        self._complete = True

    def complete(self):
        return self._complete

The difference is that scheduler reports the task as "ran successfully" instead of "complete one", but I don't see any problem with it.
We can add PhonyTask to Luigi, or we can reimplement WrapperTask using the above fashion.
Alternatively, Luigi could handle wrapper tasks as a special case, looking directly at their dependencies and skipping its complete() method.
Similar issues
This is long standing issue. It was reported at least twice:

Issue #1365 - closed, the reported use a workaround
PR #547 - got close to merging, but then closed without resolution

Any thoughts about this issue? I can create a PR with the PhonyTask class.

I agree these repeated checks are far from optimal, especially in the nested wrapper scenario you show.
The reason it's there to begin with is that a task is both checked for completeness when the dependency tree is first expanded, and then every input task is checked before a dependent task starts (if check_unfulfilled_deps) to make sure that:

the task running without exceptions actually resulted in complete() being true
the completeness hasn't been invalidated since the task ran
The intention with the above is to prevent to some best effort to never run a subsequent task if a dependency hasn't run.

I've been thinking about a good way of solving this lately, for tasks and wrappers where it might not be what you want. Perhaps letting a task define itself as "safe" or "atomic" to signify that if it ran successfully it guarantees that complete() is true immediately afterwards. This would be the same as setting check_unfulfilled_deps=False, but on a per-dependency level, which allows for better control. In addition to that, what you might want is a centralized timed cache for  true complete() results, also configurable on a task-basis.
The problem with PhonyTask in your fix is that it will only work for a single luigi host/process, since the result is cached in the in-memory task instance. You can also never re-invalidate the task, but that might be less of a problem when only running short-lived workers on a single machine. Adding that logic only to the wrapper classes will still not fix the problem of double-checking a task both during DAG expansion and before the PhonyTask is granted run permission, but it will reduce the explosion of checks caused by nested wrapper tasks (again, only when running a single process).
I hope I'll have time to contribute something in this area in the near future :)

Thank you @freider for your explanation. I am aware that I proposed a very radical (and backward incompatible) change.
I have not enough insight to anticipate all possible problems, so your response is very helpful for me.
I see the proposed PhonyTask as an alternative to the builtin WrapperTask. The difference is that PhonyTask is never complete, it is always executed again (similar to phony targets in Make). My idea is that it is cheaper to execute an empty run() method than to check whether dependencies are complete.
You correctly noticed that I set self._complete = True only because of check_unfulfilled_deps, and you are right that this works only in a single luigi host/process. But when I use check_complete_on_run=true and check_unfulfilled_deps=false (see #2992), I may not notice the issue because only one worker will check the status.
A systematic solution would be to add first-class support for phony tasks. For example, a phony task would not define complete() (similar to the missing ExternalTask.run()). The scheduler would always run such tasks.
Marking tasks as "safe" (setting check_unfulfilled_deps=False per task) would save the last extra check, but the first one would remain. If you implemented safe tasks, I would wrote my PhonyTask as a safe task with def complete(self): return False.

@freider We have use cases where I feel that a shared target state cache or something similar would make a significant difference. We often have large dependency trees where most tasks are complete, but sometimes there is a large backfill. I have a hunch that a database as a cache for GCS/S3/HDFS storage metadata would work well.
Ping me if you would like to sync on needs and design. Good to see you back active with Luigi again, BTW. :-)


is there a place to see the TPS of a pinpoint-collector ?

Prerequisites
Please check the FAQ, and search existing issues for similar questions before creating a new issue.YOU MAY DELETE THIS PREREQUISITES SECTION.

[ ] I have checked the FAQ, and issues and found no answer.

hi @feixueck
Unfotunately, There is no Web UI that show collector's TPS data.
Instead, it stores information similar to what you said every minute in a file called stat.log.
I recommend you to use this file.
thanks :)


Work with new changes in Coverage.jl

Updated the merging of coverage counts to work with the refactoring in Coverage.jl. Tested; works with codecov at least.

@timholy This is kind of a big change - I'd love it if I could get a review before I merge! I've tested this and it worked locally with the updated Coverage.jl.

It looks great to me. :+1: for the centralization.


Remove Gin dep

Blocked on https://github.com/nhooyr/websocket/issues/297

Investigate https://github.com/gobwas/ws


Running php-cs-fixer fix

Ran php-cs-fixer fix src/ --level=psr2 and php-cs-fixer fix tests/ --level=psr2.

Maybe setup https://styleci.io/?

@GrahamCampbell that's a good idea, I'll look into it.  Maybe with Scrutinizer checks already running, we should be able to spot any issues in future PRs though?  I'll find out more about what styleci can offer.

StyleCI can offer full automation for CS fixing including sending and merging PRs both at request, or, automatically on push.
It's good to separate this from scrutinzier so StyleCI can focus on the cs, travis on the tests, and scrutinizer on the static analysis and code inspection. I find that scrutinizer does a poor job of dealing with cs.

NB I'm maybe biased because I'm lead dev for StyleCI.

StyleCI is particularly good when it comes to merging external PRs with cs issues. If you've got auto sending/merging turned on, after you merge a PR, StyleCI can merge the fixes straight after. This means contributors don't need to worry about cs anymore, and people can focus on the code, not the cs. This is very useful in Laravel for example.

@Sam-Burns would you like a hand with this?


Change the order of MVKDescriptorSetLayoutBindings in MVKDescriptorSetLayout?

In the Vulkan vkCreateDescriptorSetLayout() call, the VkDescriptorSetLayoutBindings in VkDescriptorSetLayoutCreateInfo do not need to be supplied in binding number order, and currently MoltenVK populates the corresponding MVKDescriptorSetLayoutBindings in the MVKDescriptorSetLayout in the same order as the bindings appear in VkDescriptorSetLayoutCreateInfo.
However, most Vulkan operations on a descriptor set layout's bindings (for example, specifying dynamic offsets, or declaring a variable-count binding) require processing bindings in order of binding number, not positional order. This requires some mapping logic within MoltenVK.
So, there appears to be some simplification and streamlining optimizations we can make in MoltenVK, by simply sorting and holding the MVKDescriptorSetLayoutBindings in MVKDescriptorSetLayout in binding number order.
In looking at the code, I can't see any obvious processing that depends on the MVKDescriptorSetLayoutBindings being ordered in the order provided in VkDescriptorSetLayoutCreateInfo...but I may be missing something.
Can anyone determine a reason not to sort and hold the MVKDescriptorSetLayoutBindings in MVKDescriptorSetLayout in binding number order when MVKDescriptorSetLayout is created?
@cdavis5e

This is implemented in #1141.


How to use the rtmp-plugin

I am a little confused. I try like this

But it does not work, should I add
 into this?
Could you give me a example about the full case？
Thank you

Should I add this http://cdn.clappr.io/latest/clappr.min.js？

@lampchop You are right, you need to add a script tag pointing to clappr itself. The plugins do not include the clappr code.

here's a full working html:
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <script type="text/javascript" charset="utf-8" src="http://cdn.clappr.io/latest/clappr.min.js"></script>
  <script type="text/javascript" charset="utf-8" src="http://cdn.jsdelivr.net/clappr.rtmp/latest/rtmp.min.js"></script>
  <title>HLSJS Test Page</title>
  <script type="text/javascript" charset="utf-8">
window.onload = function() {
  var player = new Clappr.Player({
    source: "rtmp://fms.12E5.edgecastcdn.net/0012E5/mp4:videos/8Juv1MVa-485.mp4",
    parentId: '#player-wrapper',
    plugins: { playback: [RTMP] }
  });
}
  </script>
</head>
<body>
  <div id="player-wrapper">
  </div>
</body>
</html>


App rejected with passcode lock

This might not technically be considered a bug but I wanted to enquire as to whether anyone has had this issue.  I just received a rejection from Apple for the following reason
"Your app contains features that mimic the passcode iOS interface ."
I am not sure why they are clamping down on this now but has anyone else run into this?  I have read a few people using similar lock views have to change the buttons to not be round and maybe add a logo.
Thoughts?

Yes. My app recently got rejected for this, but only the recent version of the app because we posted a screenshot of the screen on iTunes Connect. The earlier version passed the review as we didn't had the screenshot attached on iTunes Connect.
I've also added the logo but still...
I guess changing the button structure to anything other than the rounded one should be allowed :)

@Bhide Is your app approved after changing the buttons shape?

@klwoon Yes. It got approved after I changed the button shape.


fix: When a node cannot bind, it should stop scheduling pods to that node

What type of PR is this?
/kind bug

What this PR does / why we need it:
When a node cannot bind, it should stop scheduling pods to that node
Which issue(s) this PR fixes:
Part of https://github.com/Project-HAMi/HAMi/issues/272
Special notes for your reviewer:
When the lock hasn't expired yet.
the log of kube-scheduler
│ kube-scheduler I0417 07:44:16.769658       1 schedule_one.go:794] "Failed to bind pod" pod="default/gpu-brun-high-5959f868c8-4qnlr"                                                                                │
│ kube-scheduler E0417 07:44:16.769797       1 scheduler.go:367] "Error scheduling pod; retrying" err="binding rejected: node node6 has been locked within 5 minutes" pod="default/gpu-brun-high-5959f868c8-4qnlr"                                                                                │
│ kube-scheduler I0417 07:44:16.769966       1 schedule_one.go:847] "Updating pod condition" pod="default/gpu-brun-high-5959f868c8-4qnlr" conditionType=PodScheduled conditionStatus=False conditionReason="SchedulerError"

the status of pod
status:
  phase: Pending
  conditions:
    - type: PodScheduled
      status: 'False'
      lastProbeTime: null
      lastTransitionTime: '2024-04-17T07:43:57Z'
      reason: SchedulerError
      message: 'binding rejected: node node6 has been locked within 5 minutes'
  qosClass: Guaranteed

When the lock expires.
│ I0417 07:47:34.906040       1 scheduler.go:323] "Bind" pod="gpu-brun-high-5959f868c8-4qnlr" namespace="default" podUID="7d5af6d4-a7fe-493d-ae4b-ef259cac9e99" node="node6"                                                                                │
│ I0417 07:47:34.919515       1 nodelock.go:96] "Node lock expired" node="node6" lockTime="2024-04-17 07:42:25 +0000 UTC"                                                                                │
│ I0417 07:47:34.952036       1 nodelock.go:78] "Node lock released" node="node6"                                                                                │

│ I0417 07:47:34.983562       1 nodelock.go:46] "Node lock set" node="node6"                                                                                │

│ I0417 07:47:34.998518       1 util.go:228] "Decoded pod annos" poddevices={"Iluvatar":[[{"Idx":0,"UUID":"GPU-e290caca-2f0c-9582-acab-67a142b61ffa","Type":"NVIDIA","Usedmem":1000,"Usedcores":15}]],"NVIDIA":[[{"Idx":0,"UUID":"GPU-e290caca-2f0c-9582-acab-67a142b61ffa","Type":"NVIDIA","Usedmem":1000,"Usedcores":15} │
│ I0417 07:47:35.003494       1 scheduler.go:364] After Binding Process

Does this PR introduce a user-facing change?:

/cc @wawa0210 @haitwang-cloud @archlitchi PTAL.

/lgtm look good to me
cc @archlitchi

thanks /lgtm


[BUG] Config already exists

Describe the bug
when create new config and the name already used openbullet will be crushed
To Reproduce
Steps to reproduce the behavior:

Go to 'Configs'
Click on '(+) New'
Enter name already exists
Click accept
See error

Version

Version 1.2.1

Duplicate of #579


ci: Configure dependabot

Note that the new uv.lock file added in #398 will not be updated at the moment.
There's an open issue for that: dependabot-core#10478

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.50%. Comparing base (060649b) to head (65c5f16).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #400   +/-   ##
=======================================
  Coverage   92.50%   92.50%
=======================================
  Files          48       48
  Lines        5178     5178
=======================================
  Hits         4790     4790
  Misses        388      388

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


feat(optimizer): add ENABLE_TWO_PHASE_AGG session variable

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?

Checklist

[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features).
[x] I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer the issue)
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Documentation
If your pull request contains user-facing changes, please specify the types of the changes, and create a release note. Otherwise, please feel free to remove this section.
Types of user-facing changes
Please keep the types that apply to your changes, and remove those that do not apply.

Installation and deployment
Connector (sources & sinks)
SQL commands, functions, and operators
RisingWave cluster configuration changes
Other (please specify in the release note below)

Release note
Please create a release note for your changes. In the release note, focus on the impact on users, and mention the environment or conditions where the impact may occur.
Refer to a related PR or issue link (optional)
#7491

WIP, will add test for two phase simple agg.

LGTM. And should we enable 2-phase agg for agg with group by when the variable is true? 🤔

I prefer ENABLE_TWO_PHASE_AGG to be on by default, and not force optimizer to use 2-phase agg.
I will introduce FORCE_TWO_PHASE_AGG session variable for that purpose, it will be more intuitive.
May take a look at #7491 description, to see FORCE and ENABLE semantics.


suggestion: use GL_ARB_texture_swizzle for remove shader branching

i use that extension for avoid putting bool uniforms and avoid using conditionals on my fragment shader, i mean, you can remove this:
vec4 rTexel(sampler2D tex, vec2 uv) {
  if (rapid_textureEnabled) {
    if (rapid_renderText) {
      return vec4(vec3(1.0), texture(tex, uv).r);
    } else {
      return texture(tex, uv);
    }
  } else {
    return vec4(1.0);
  }
}

and simplify to:
texture(tex, uv) * col;

because your 1byte per pixel (atlas) texture can be swizzled to (1,1,1,RED) and if you dont need UV coords you can default that uv attrib to a white pixel on atlas

I'd prefer to avoid using any extensions, as I can't be sure that all graphics cards/drivers support them (unlike the OpenGL standard, which I can rely on).
If I were to keep backwards compatibility, I'd need to keep two implementations of this function which only makes the problem worse.

this extension is in OpenGL 3.3 Core Profile, the version of your glad.nim, but sadly, unsupported on WebGL and ES 2.0 (ES 3.0 supports it), so it can't be improved if you want target them.
but at least there was the simplification possibility

Reopening this since aglet (rapid's new backend) will have this feature in the future.

i have a working example here using OpenGL 3.3 Core

Regarding conditionals in shaders, it's not that bad if you're testing against uniform variables, as the compiler can simply create multiple shaders with these branches precomputed. Even so, because driver implementations are known to be pretty inconsistent, implementing this should increase performance on some old, low-end GPUs. Or so I think.

if your target is OpenGL 3.3+ and ES 3.x, you can use this feature without any problems. The oldest posible gpu is NVIDIA GeForce 210 (or 8400GS). An alternative for WebGL and ES 2.x (or below) is GL_ILUMINANCE format. The idea is simplify that shader code.
And for avoid this conditional:
  if (rapid_textureEnabled) {
    // Check between alpha-only or color texture
    // (Job of texture swizzling)
  }

use an UV coordinate of a white pixel (1.0, 1.0, 1.0, 1.0) from your texture atlas, not only avoids that branching but also you can perform a batch optimization for glyph rendering and solid geometry rendering using fewer calls


Add support for FreeIPA as a LDAP vendor

Hey, I just made a Pull Request!
As discussed in #12493 I've added a LDAP vendor for FreeIPA.
I've based the change in getVendor on the getRootDSE output from FreeIPA:
# extended LDIF
#
# LDAPv3
# base <> (default) with scope baseObject
# filter: (objectclass=*)
# requesting: ALL
#

#
dn:
objectClass: top
namingContexts: dc=intra,dc=organization,dc=io
namingContexts: cn=changelog
namingContexts: o=ipaca
defaultnamingcontext: dc=intra,dc=organization,dc=io
supportedExtension: 2.16.840.1.1137<IP_ADDRESS>
...ommitted additional supportedExtension...
supportedControl: 2.16.840.1.1137<IP_ADDRESS>
...ommitted additional supportedControl...
supportedSASLMechanisms: EXTERNAL
supportedSASLMechanisms: GSS-SPNEGO
supportedSASLMechanisms: GSSAPI
supportedSASLMechanisms: DIGEST-MD5
supportedSASLMechanisms: CRAM-MD5
supportedSASLMechanisms: LOGIN
supportedSASLMechanisms: PLAIN
supportedSASLMechanisms: ANONYMOUS
supportedLDAPVersion: 2
supportedLDAPVersion: 3
vendorName: 389 Project
vendorVersion: 389-Directory/<IP_ADDRESS> B2022.061.1818
dataversion:<PHONE_NUMBER>25028020220516125028020220516125028
netscapemdsuffix: <redacted>
lastusn: 1593209
changeLog: cn=changelog
firstchangenumber: 0
lastchangenumber: 0
ipatopologypluginversion: 1.0
ipatopologyismanaged: on
ipaDomainLevel: 1

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

I'm still looking into how to test my change against the actual FreeIPA instance that we have. I couldn't find any documentation on how to use a dev version of Backstage to test specific features. Any pointers would be welcome.
:heavy_check_mark: Checklist

[X] A changeset describing the change and affected packages. (more info)
[X] Added or updated documentation
[X] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[X] All your commits have a Signed-off-by line in the message. (more info)

@Rugvip I'm still trying to validate the logic in our environment by using my local version of the plugin. Any pointers on this process? Should a yarn link suffice?

@mrooding see https://backstage.io/docs/local-dev/linking-local-packages, hopefully there are few enough deps for that not to be a big pain.

Hi @Rugvip, thanks for the link. I should only link catalog-backend-module-ldap but no matter what I try it keeps throwing an error when I run yarn build:
yarn run v1.22.18
$ backstage-cli repo build --all
Building packages

Error: No declaration files found at ../../../developer-portal/backstage/plugins/catalog-backend-module-ldap/src/index.d.ts, be sure to run yarn tsc to generate .d.ts files before packaging

My folder structure looks like this:
backstage/
developer-portal/

Based on the folder structure, I'm adding "../backstage/plugins/catalog-backend-module-ldap" to the root package.json and larna.json as stated by the guide.
What I find peculiar is that it tries to point to the backstage/plugins/.. folder from within ../../../developer-portal folder 🤔 What am I doing wrong?


Ensure MessageInfo deleted flag is set correctly for deleted messages

A Get request with Include_Deleted or Include_All returns messages
that were subsequently deleted. The MessageInfo associated with these
returned values however should say that the message is deleted, which
it does not, today. Fixing that.

Codecov Report

Merging #1072 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #1072      +/-   ##
============================================
- Coverage     68.56%   68.48%   -0.09%
+ Complexity     4811     4805       -6
============================================
  Files           382      382
  Lines         30461    30462       +1
  Branches       3872     3873       +1
============================================
- Hits          20887    20861      -26
- Misses         8527     8547      +20
- Partials       1047     1054       +7

Impacted Files
Coverage Δ
Complexity Δ

...va/com.github.ambry.replication/ReplicaThread.java
72.31% <ø> (-0.2%)
60 <0> (ø)

...ava/com.github.ambry/config/ReplicationConfig.java
100% <100%> (ø)
1 <0> (ø)
:arrow_down:

...n/java/com.github.ambry.store/PersistentIndex.java
91.67% <100%> (ø)
194 <0> (ø)
:arrow_down:

...c/main/java/com.github.ambry.network/Selector.java
78.4% <0%> (-3.6%)
45% <0%> (-1%)

...java/com.github.ambry.store/CompactionManager.java
86.75% <0%> (-2.65%)
19% <0%> (ø)

...rc/main/java/com.github.ambry.store/BlobStore.java
83.24% <0%> (-1.6%)
70% <0%> (-2%)

.../java/com.github.ambry.router/DeleteOperation.java
92.19% <0%> (-1.42%)
47% <0%> (-1%)

...m.github.ambry.clustermap/HelixClusterManager.java
92.39% <0%> (-1.13%)
33% <0%> (ø)

...b.ambry.network/BlockingChannelConnectionPool.java
62.6% <0%> (-0.87%)
7% <0%> (-1%)

...src/main/java/com.github.ambry.commons/BlobId.java
86.97% <0%> (-0.43%)
59% <0%> (-1%)

... and 3 more

Continue to review full report at Codecov.

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


GlobalComponents intellisense not available if data object is not empty

Vue - Official extension or vue-tsc version
2.0.8
VSCode version
1.89.1
Vue version
3.4.21
TypeScript version

System Info
System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
    Memory: 4.88 GB / 15.69 GB
  Binaries:
    Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (125.0.2535.92)
    Internet Explorer: 11.0.22621.3527

Steps to reproduce
I noticed that GlobalComponents intellisense from node_modules disappears after adding a new property to the object returned from data function in Options API mode
This is what I see with empty object:

This is what I see with at least one property:

I don't know if something is missing in my editor configuration, but it's easy to reproduce.
I also tried to remove all setting and extensions, just only Vue, but nothing changed.
Thanks in advance.
Link to minimal reproduction
https://github.com/fabio-emmedata/test-vue-extension
Any additional comments?
This is how I create the linked repo to reproduce the case:

Solved with "vue.server.hybridMode": true


could not connect to display

Is there anyone meet this question, I use docker ubuntu18.04,pytorch 1.4,cuda 10.0
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/xueyq/anaconda3/envs/centertrack/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Sorry to disturb you. But I met the same question, could you tell me how to solve it? Thanks a lot!

The reason of this issue is that my service has no Graphical interface, so I commented all of the "cv2.imgshow()" code blocks in the whole program.You can try this, or you can download the package of Graphical interface to use the cv2.imgshow() to show the visual results.
------------------ 原始邮件 ------------------
发件人:                                                                                "xingyizhou/CenterTrack"<EMAIL_ADDRESS>发送时间: 2020年11月5日(星期四) 下午2:40
收件人<EMAIL_ADDRESS>抄送: "阿亚亚亚"<1446005161@qq.com>;"State<EMAIL_ADDRESS>主题: Re: [xingyizhou/CenterTrack] could not connect to display (#141)
Sorry to disturb you. But I met the same question, could you tell me how to solve it? Thanks a lot!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.


How to get translated string from $translate service synchronously

This is the common pattern to use $translate service.
$translate(translationId).then(function (translatedString) {
//Code to use translatedString
});
But I have the requirement to call it synchronously on many places in the apps.
How would I get the translated string synchronously like for example
var translatedString = $translate(translationId);

This should probably be added here I think: http://angular-translate.github.io/docs/#/guide/03_using-translate-service
I searched around for a good hour. Eventually found this github issue.

+1 to adding this to the guide.

+1 works better!

Also we can use it this way:
$filter("translate")("translation_id", {interpolations_params});

$translate.instant returns me TrustedValueHolderType instead of a string

$filter("translate")("translation_id", {interpolations_params});

That also returns me a TrustedValueHolderType instead of a string. How can I fix it?

@steelx @alejandroiglesias
For getting value from TrustedValueHolderType  I used $sce.valueOf method
var translation = $translate.instant(translationKey);
var translationText = $sce.valueOf(translation);

In 2018, we also need this...

@styopdev thank you

In 2019, we also need this...

In 9102, we also need this...

It's 2020, we also need this...


Added persistence info for Enterprise

Data persistence in Enterprise and Enterprise Flash tiers are in preview. This wasn't reflected in the doc as it currently stands.

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

@flang-msft
Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

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

#sign-off

#sign-off