feat(plugin): add supportedVersions property

Which problem is this PR solving?
It's backward compatible. supportedVersion is optional in plugins. If not defined, all versions are supported. See related tests.
Closes #132
Signed-off-by: Olivier Albertini<EMAIL_ADDRESS>

Codecov Report

Merging #237 into master will decrease coverage by 0.06%.
The diff coverage is 95.65%.

@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
- Coverage   98.78%   98.72%   -0.07%
==========================================
  Files          55       55
  Lines        2146     2036     -110
  Branches      147      134      -13
==========================================
- Hits         2120     2010     -110
  Misses         26       26

Impacted Files
Coverage Δ

...metry-core/src/trace/instrumentation/BasePlugin.ts
12.5% <ø> (ø)
:arrow_up:

...telemetry-node-tracer/src/instrumentation/utils.ts
96.66% <100%> (+0.83%)
:arrow_up:

...try-node-tracer/test/instrumentation/utils.test.ts
100% <100%> (ø)
:arrow_up:

...ry-node-tracer/src/instrumentation/PluginLoader.ts
88% <50%> (-1.59%)
:arrow_down:

...telemetry-core/src/context/propagation/B3Format.ts
94.59% <0%> (-3.24%)
:arrow_down:

...core/src/context/propagation/BinaryTraceContext.ts
96.15% <0%> (-2.21%)
:arrow_down:

...s/opentelemetry-core/test/context/B3Format.test.ts
100% <0%> (ø)
:arrow_up:

...s/opentelemetry-core/test/trace/tracestate.test.ts
100% <0%> (ø)
:arrow_up:

...entelemetry-core/test/common/ConsoleLogger.test.ts
100% <0%> (ø)
:arrow_up:

... and 16 more

Nice! How do you set the supportedVersions? Is it going to be part of PluginConfig
When developer write a plugin, it need to specify all supported versions, see Plugin interface and BasicPlugin abstract class.

When the hook is triggered, we check if the version is satisfied.
if (!utils.isSupportedVersion(version, plugin.supportedVersions)) {
     return exports;
}

Ok, got it, thanks for the clarification. 👍

LGTM. To verify, empty array [] means that no versions are supported and so no patching would be done?

Yeah sounds not safe... So I added a test and now it's the same behaviour than undefined

It would be nice If you can add 1-2 tests in PluginLoader.test.ts.

Done.

LGTM. To verify, empty array [] means that no versions are supported and so no patching would be done?

Yeah sounds not safe... So I added a test and now it's the same behaviour than undefined

Actually, I think it makes sense for it to do not patching in this case since it'd be explicitly set to "no versions". On the other hand, I'm not sure why a non-patching plugin would exist in first place. What do you think?

Is it going to be part of PluginConfig (pull/229)?

It's interesting! Let's say, developer sets some supportedVersions... and client find a version that is not supported but works for some reasons. It could override this without waiting a PR approval etc.. ?

It's interesting! Let's say, developer sets some supportedVersions... and client find a version that is not supported but works for some reasons. It could override this without waiting a PR approval etc.. ?

Agreed. I like the current approach.

LGTM. To verify, empty array [] means that no versions are supported and so no patching would be done?

Yeah sounds not safe... So I added a test and now it's the same behaviour than undefined

Actually, I think it makes sense for it not to do patching in this case since it'd be explicitly set to "no versions". On the other hand, I'm not sure why a non-patching plugin would exist in first place. What do you think?

In order to reduce possible frustrations, having[] or undefined should have the same behaviour. If you don't specify at least a version, it means that all versions is supported. As you said, it make no sense to set [] in order to deactivate the plugins (we can do that with PluginConfig)


Validate prefilled slots

Proposed changes:

validate slots filled before start of form
debug logging for values of required slots before form submission
debug logging for submission of form

Status (please check what you already did):

[x] made PR ready for code review
[x] added some tests for the functionality
[ ] updated the documentation
[x] updated the changelog

here's what the logging output will look like

god bless. Sorry for the 5000 review requests, you're a champ

no worries, that's how it is usually


Broken test: RestartProcessThatTerminatesAfterFileChange on High Sierra

System.TimeoutException : The operation at /_/test/dotnet-watch.FunctionalTests/AwaitableProcess.cs:68 timed out after reaching the limit of 30000ms.
[03:53:52]	   at Microsoft.AspNetCore.Testing.TaskExtensions.TimeoutAfter[T](Task`1 task, TimeSpan timeout, String filePath, Int32 lineNumber)
   at Microsoft.DotNet.Watcher.Tools.FunctionalTests.AwaitableProcess.GetOutputLineAsync(String message, TimeSpan timeout) in /_/test/dotnet-watch.FunctionalTests/AwaitableProcess.cs:line 68
   at Microsoft.DotNet.Watcher.Tools.FunctionalTests.NoDepsAppTests.RestartProcessThatTerminatesAfterFileChange() in /_/test/dotnet-watch.FunctionalTests/NoDepsAppTests.cs:line 55
--- End of stack trace from previous location where exception was thrown ---

This tests fails High Sierra builds every time.

@JunTaoLuo said he was going to do the initial investigation here, suspects it's an SDK issue.

@JunTaoLuo Moved out of the milestone, but if we get to it I don't mind.

I think there may be a real product issue. See #416

Yea this one shouldn't be moved out of the milestone

I assume based off @natemcmaster  and @JunTaoLuo's comments that this not being in the 2.1.0-preview2 milestone was an oversight.

Took some time to investigate this today and on my local machine the test is flaky instead of just broken. It definitely is a product issue though since it is consistently flaky after we updated the SDK version. I wasn't able to track down the root cause though. @natemcmaster I noticed that you have done some work here so in case I still don't get anywhere with my investigations tonight can you take a look while I'm off on vacation?

I'll take a look

Since this corresponds to an SDK update, I suspect it may be another side effect of node reuse, which was the big thing to land recently in the SDK. I couldn't reproduce locally, so it might just be a CI issue. Regardless, let's disable nodeReuse inside dotnet-watch until we can investigate more.: https://github.com/aspnet/DotNetTools/pull/418

Should be fixed in https://github.com/aspnet/DotNetTools/pull/419. I verified the flakiness on my computer and that https://github.com/aspnet/DotNetTools/pull/419 fixed it. I'll keep an eye on CI and will re-open if the tests is still failing.

Still flaky. http://aspnetci/viewLog.html?buildId=449723&tab=buildResultsDiv&buildTypeId=Releases_21Public_UbuntuUniverse
System.TimeoutException : The operation at /_/test/dotnet-watch.FunctionalTests/AwaitableProcess.cs:68 timed out after reaching the limit of 30000ms.
   at Microsoft.AspNetCore.Testing.TaskExtensions.TimeoutAfter[T](Task`1 task, TimeSpan timeout, String filePath, Int32 lineNumber)
   at Microsoft.DotNet.Watcher.Tools.FunctionalTests.AwaitableProcess.GetOutputLineAsync(String message, TimeSpan timeout) in /_/test/dotnet-watch.FunctionalTests/AwaitableProcess.cs:line 68
   at Microsoft.DotNet.Watcher.Tools.FunctionalTests.NoDepsAppTests.RestartProcessThatTerminatesAfterFileChange() in /_/test/dotnet-watch.FunctionalTests/NoDepsAppTests.cs:line 55
--- End of stack trace from previous location where exception was thrown ---
------- Stdout: -------
The temporary test folder is /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx
Copying project /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/TestProjects/NoDepsApp to /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp
Restoring msbuild project in NoDepsApp
Project directory: '/mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp'
Started process 126362: /mnt/work/33bdfc1cae7b2a38/.dotnet/dotnet restore
  Restoring packages for /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp/NoDepsApp.csproj...
  Generating MSBuild file /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp/obj/NoDepsApp.csproj.nuget.g.props.
  Generating MSBuild file /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp/obj/NoDepsApp.csproj.nuget.g.targets.
  Restore completed in 297.47 ms for /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp/NoDepsApp.csproj.

Process exited 126362
Process exited 126362 with code 0
Building NoDepsApp
Project directory: '/mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp'
Started process 126480: /mnt/work/33bdfc1cae7b2a38/.dotnet/dotnet build
Microsoft (R) Build Engine version <IP_ADDRESS>551 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 53.03 ms for /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp/NoDepsApp.csproj.
  You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
  NoDepsApp -> /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tmp/fdhvnksz.rdx/NoDepsApp/bin/Release/netcoreapp2.1/NoDepsApp.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.96

Process exited 126480
Process exited 126480 with code 0
4/18/18 12:58:10 AM: process start: '/mnt/work/33bdfc1cae7b2a38/.dotnet/dotnet /mnt/work/33bdfc1cae7b2a38/modules/DotNetTools/bin/dotnet-watch.FunctionalTests/Release/netcoreapp2.1/tool/dotnet-watch.dll run --'
Waiting for output line [msg == 'Started']. Will wait for 120 sec.
4/18/18 12:58:11 AM: post: 'watch : Started'
4/18/18 12:58:11 AM: recv: 'watch : Started'
4/18/18 12:58:14 AM: post: 'Started'
4/18/18 12:58:14 AM: post: 'PID = 126914'
4/18/18 12:58:14 AM: recv: 'Started'
4/18/18 12:58:14 AM: post: 'Exiting'
Waiting for output line [msg.StartsWith('PID =')]. Will wait for 30 sec.
4/18/18 12:58:14 AM: recv: 'PID = 126914'
Waiting for output line [msg == 'Exiting']. Will wait for 30 sec.
4/18/18 12:58:14 AM: recv: 'Exiting'
Waiting for output line [msg == 'watch : Exited']. Will wait for 30 sec.
4/18/18 12:58:14 AM: post: 'watch : Exited'
4/18/18 12:58:14 AM: recv: 'watch : Exited'
4/18/18 12:58:14 AM: post: 'watch : Waiting for a file to change before restarting dotnet...'
Waiting for output line [msg == 'Started']. Will wait for 30 sec.
4/18/18 12:58:14 AM: recv: 'watch : Waiting for a file to change before restarting dotnet...'
Disposing WatchableApp

Fixed in https://github.com/aspnet/DotNetTools/commit/3193f45bae62c2dd2b0867e6efe26cce8f3738ce


Support to Resolve ID Switches For Tracking Applications

Dear Team,
ID Switch is a common problem in tracking applications. And while preparing ground truths for tracking applications, the human annotators may create this error and later during revision it will be too difficult to resolve id switch as it will involve re-annotating the tracks from scratch or manually switching the tracks for each keyframe. I guess this process can be automated, while the code can switch labels between two tracks after the mentioned frame number.
I think this feature is vital for tracking applications and will reduce huge efforts the annotators waste in fixing the id switches.
Best Regards,
M. Maaz

The solution can be found at https://github.com/mmaaz60/cvat_id_switch_solution

@mmaaz60 , I'm not sure I understand your request. We have ability to split and merge tracks. If you have 2 tracks, you always can merge them into one without reannotation. I will close the issue as outdated.


Fix/patch aggregate rating

This PR fixes #90 and updates the data image with the error fixed

LGTM with the suggestion fixed
thanks!

LGTM, thanks


HDDS-10801. Replace GSON with Jackson in hadoop-ozone classes.

What changes were proposed in this pull request?
This pull request introduces a migration from Gson to Jackson for the remaining classes of the hadoop-ozone module, specifically focusing on replacing Gson's JsonParser with Jackson's ObjectMapper. It involves using ObjectMapper's readValue() method to deserialise JSON strings into Java objects. Additionally, the code utilises Jackson's JsonNode to navigate and extract data from JSON structures.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10801
How was this patch tested?
Ran the UT's

@devmadhuu @szetszwo Can you please take a look

The forked CI ran green :- https://github.com/ArafatKhan2198/ozone/actions/runs/9000812228

@devmadhuu @szetszwo Can you take look!

@ArafatKhan2198 , thanks a lot for working on this!
@devmadhuu , thanks for reviewing this!

@ArafatKhan2198 , after this change, could we remove the GSON dependency from pom.xml?


Update NumFOCUS donation link

NumFOCUS has changed from using flipcause to Salsa. The link has been updated here.

@ruv7 @ellisonbg


Unable to install gulp

Category

[ x] Question
[ ] Typo
[x ] Bug
[ ] Additional article idea

Expected or Desired Behavior
Expect yo command to work after: npm i -g yo gulp
This is on Windows 7 Enterprise (Build 7601:SP1). Can someone tell me if Windows 7 is supported for SPFx development? Is this the below error normal?
Observed Behavior
When running: npm i -g yo gulp on Windows 7 Enterprise (Build 7601:SP1).
I get error:
"
√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ Node.js version
√ No .bowerrc file in home directory
√ No .yo-rc.json file in home directory
x yo version
Your yo version is outdated.
Upgrade to the latest version by running:
npm install -g yo@latest
√ npm version
Found potential issues on your machine :(

<EMAIL_ADDRESS>updated 1 package in 9.391s"

Tried to do npm install -g yo@latest as suggested but get same error.

This is not the SPFx but the NPM/NodeJs issue.


Add a donate link

I would gladly donate if it means a chance of more development time being spent on this.

That is awesome :3
I will talk about it with @stenwessel. When we got something setup I'll let you know!

Great that you appreciate the plugin! What kind of issues/feature requests would you like to see fixed?

What kind of issues/feature requests would you like to see fixed?

The plugin is almost to the point where I'd use it as my primary LaTeX editor. At the moment, my main LaTeX editor is still TeXstudio, and I switch to IntelliJ with this plugin to handle repository stuff, doing project wide find and replace, and anything else where a professional IDE provides advantages. However, TeXstudio has several problems of its own.
The main things I like in TeXstudio that are keeping me using it over this plugin are the "issue" messages it provides (a simplified list of errors, warnings, etc) rather than showing the full output log. These issue messages also provide links to jump to what's causing the issue. Though the full log is available when needed, I almost never need it, and this makes things much cleaner and smoother. The other major piece is better Mac support, particularly in regard to the PDF interaction (e.g. jump to source/PDF). Finally, just as a minor issue, I tend to keep each section/component in a different file tex, including the preamble (resulting in a main file that just contains the organizational structure, and nothing else). So far the plugin doesn't seem to like this, as it can't figure what packages are included.
Thanks for all the work so far!

I tend to keep each section/component in a different file tex, including the preamble (resulting in a main file that just contains the organizational structure, and nothing else). So far the plugin doesn't seem to like this, as it can't figure what packages are included.

Hmm. Can you give me an example? Because this sounds like a bug to me. There's a reason we encourage separating content via inspections and intentions.

I like in TeXstudio that are keeping me using it over this plugin are the "issue" messages it provides (a simplified list of errors, warnings, etc) rather than showing the full output log.

We're definitely planning to implement this. Speaking of which, I have the IntelliJ SDK tab open in chrome. The issue we're having with this is that this might be linked to the run configurations in an inconvenient way (correct me if I'm wrong @stenwessel).

The other major piece is better Mac support, particularly in regard to the PDF interaction (e.g. jump to source/PDF).

Yes.. We're all working on windows or linux which makes this hard to test ourselves. Definitely planning on adding better Mac support though (See #122).
It might be interesting to look at our project page which contains our ideas for future releases. It hasn't been updated a lot lately though.

Though I haven't looked at the ideas page (or many of the issues), I assumed most of this was on the list. Which is exactly why I'd like to donate.
For possible bug, if I have:
main.tex
\input{preamble}
\begin{document}
    \input{content}
\end{document}

preamble.tex
\documentclass[11pt]{article}
\usepackage{amsmath}

content.tex
\begin{equation}
    \text{Text in math}
\end{equation}

Then I get a warning from \text saying that it requires the amsmath package.

After a bit of fiddling with the debugger, I think found the problem.
In order to find the so called 'file set' of a file (basically the referenced file tree), we need to determine the root first and start scanning from there. The root is assumed to contain the \documentclass command. Because you put the \documentclass command in a separate file, the algorithm does not recognise main.tex as root, hence it won't do the import inspections properly.
Try lifting the documentclass out of preamble.tex and put it in main.tex and the problems should be resolved..

Try lifting the documentclass out of preamble.tex and put it in main.tex and the problems should be resolved.

Example: https://github.com/Ruben-Sten/TeXiFy-IDEA#what-should-my-document-structure-look-like
I recently found a python script called latexrun which says it's parsing log files for messages, but I don't know if it's helpful: https://github.com/aclements/latexrun/. But yeah I agree providing messages should have high priority.

Added as badge in README :)

I will attempt to implement compilation messages using the External Build API (http://www.jetbrains.org/intellij/sdk/docs/reference_guide/frameworks_and_external_apis/external_builder_api.html). In particular, after compiling the Latex, the output will be parsed to extract individual errors and will be displayed using the CompileContext class, which should be made available through the External Build API.
I am a little concerned that using the External Build API will be difficult because its documentation is light on specifics details. I've posted (http://www.jetbrains.org/intellij/sdk/docs/reference_guide/frameworks_and_external_apis/external_builder_api.html) on the Intellij API forum requesting help on this matter.

@PhilipAxelrod without reading your message completely, shouldn't it be posted at #155 instead?

Good idea, I copy move my comment over to issue #155 , since this issue is closed.


Not able to update dependencies

Hello, I was trying to upgrade the bitcoin dependencies namely:
bitcoin 0.30.2 -> 0.31
bitcoin_hashes = 0.12.0 -> 0.15
While doing so I noticed that bitcoin_hashes::hex::HexIterator does not exist. What I wanted to do is to iterate over the hex of transaction and then decode with bitcoin::consensus::Decodable::consensus_decode(). I was not able to find much info regarding this on docs.rs. Can anyone point me to the right direction?
Thanks.

You can deserialize a Transaction from hex using consensus::deserialize::<Transaction>(&hex).
We have an issue somewhere to make this more obvious but I can't find it right now.

And in case you really want to know how to iterate over bytes of a hex string see the implementation of that function on master. (I did not look back at v0.31 though when answering this question)

Thank you, consensus::deserialize_hex::<Transaction>(&hex) does the job!


Add tests and better documentation

This looks great, I just wish there were some tests and the documentation was a little bit better.

i m working on a more full-featured version of this. :)

@beeplin keep me updated (I'll watch the repo)! I'm super interested in it and I think this whole concept is really intelligent.

@elfey this repo is deprecated since the feathers core team now has feathers-offline-realtime etc. to serve this purpose. ;)


Timezone data in dashboard does not work

When using a date field in tables and queries containing zone data, neither queries, formating of the field or formulas on the field works. If the zone data is UTC, i.e. 0, it works fine.

Queries still only support UTC unfortunately (see issue #15). Version 5.0.beta.10 defaults table result fields to use local time without outputting the timezone.


batching multi-client server

          > > How to use this to allow multiple clients to connect when you host a server or create an API for live transcription?

I don't know, it's a topic that requires a separate issue. But first, there must be a Whisper backend that enables batching -- more inputs processing at once. If there's not, then use one GPU with one server for one client.

Thank you. Using one GPU for each client is a tall ask for me as there could be up to  a dozen clients active at a particular time for my use case.  I think there are a few backends which do support batched processing. e.g.  https://github.com/Blair-Johnson/batch-whisper
If you have any references or you can point me to the parts where changes are needed to implement this.
Or is it alright if I create a new issue for this?
Originally posted by @umaryasin33 in https://github.com/ufal/whisper_streaming/issues/10#issuecomment-1846973695

but more projects could use this feature, like https://github.com/ufal/correctable-lecture-translator . Open-sourcing and collaboration is welcome!


Error 400, Limit Exceeded

Describe the bug
Basically, about a week ago i set this up. Yesterday i got this message:

In the config i have not set anything about instance ocpu or ram, and its saying this. I'm unsure if this means 4ocpu is too much or something else. I am also running this script on oracle cloud VM.Standard.E2.1.Micro through ssh. I have checked the github and i cant find any way to customise size of instance. Yeah thats basically it, all i want is a minecraft server.
Expected behavior
Create an instance, preferrable max size (or 3ocpu)
Instance Type (please complete the following information):
OCI_COMPUTE_SHAPE=VM.Standard.A1.Flex
SECOND_MICRO_INSTANCE=False
REQUEST_WAIT_TIME_SECS=60
SSH_AUTHORIZED_KEYS_FILE=/home/ubuntu/oracle-freetier-instance-creation/id_rsa.pub

Custom Image or default: Ubuntu 22.04

Environment (please complete the following information):

Micro Instance or Local: The script is running on oracle cloud, micro instance. (the 1ocpu one) VM.Standard.E2.1.Micro
OS: Ubuntu
Version: 22.04

Screenshots

Additional context
Yeah, i'm really unsure what to do.  Thanks

Hey, i just looked at the code and couldnt find any config for it, could i suggest some? I dont know how to start a pull request (sorry if i did it wrong i dont know much python):
main.py (around the start) and lines 410~:
...
OCI_COMPUTE_OCPUS = int(os.getenv("OCI_COMPUTE_OCPUS", "4").strip())
OCI_COMPUTE_MEMORY = int(os.getenv("OCI_COMPUTE_MEMORY", "24").strip())
...
    if OCI_COMPUTE_SHAPE == "VM.Standard.A1.Flex":
        shape_config = oci.core.models.LaunchInstanceShapeConfigDetails(ocpus=OCI_COMPUTE_OCPUS, memory_in_gbs=OCI_COMPUTE_MEMORY)

oci.env:
...
OCI_COMPUTE_OCPUS="4"
OCI_COMPUTE_MEMORY="24"
...

Hey @aryanmcr, adding option to customize the size pretty straightforward, just as you described. I haven't included that because basically everyone's looking for an instance with maximum free capacity. I'll include it along with future changes. But I think your issue is a little bit different if I understood correctly.
Just to clarify, the free tier for ARM instances allows for up to 4 vCPUs and 24GB of RAM, while the Micro tier lets you have 2 instances with 1 vCPU each. If you haven't set up an ARM instance yet, you should be able to create one with those max limits.
Are you trying to create your first ARM resource, or is this for a second instance? Let me know, and we can debug the error together.

Hey, I've never created an arm instant, only micros

ohh then you should be able to create a instance with 4vcpu , are you still getting same limit exceeded error ?

I can confirm. Getting the same error.
I have two micro instances but zero Standard.A1.Flex ones.
I'm getting

The only thing which comes to mind is boot volumes.
I have checked, I do not have any old boot volumes, but I have two 50Gb ones for Micro instances. Maybe those are blocking it.

Same for me

We are allowed to create 200GB of total space in the free tier, if yours didn't exceed then it might probably be the case mentioned here and I currently don't have a way to handle this as I already implemented some increased wait time on limit exceeded error. Maybe I should see if there is a way to refresh the connection or something

Also, the script does not proceed with retries after the error. Or at least it stops producing any logs.

I've changed the line 400 to
       shape_config = oci.core.models.LaunchInstanceShapeConfigDetails(ocpus=3, memory_in_gbs=18)
but have the same error. 3 times in a raw.


More screenshots needed

This document needs more screenshots to show exactly where the User Flows page exists. I spent so much time trying to find it from inside of the Azure B2C tenant, only to find out that you have to be outside of the Tenant itself and managing the Azure B2C service itself. This needs to be clearer and show screenshots of the steps to get there.

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

ID: bee63035-00ee-f7fd-97a1-69dae5f808ef
Version Independent ID: a3447928-73cc-0290-6d46-b89234757e3b
Content: Tutorial - Create user flows and custom policies - Azure Active Directory B2C
Content Source: articles/active-directory-b2c/tutorial-create-user-flows.md
Service: active-directory
Sub-service: b2c
GitHub Login: @kengaderdus
Microsoft Alias: kengaderdus

Thanks for your feedback! We will investigate and update as appropriate.

Hi @stephajn , what exact step did you have trouble with, so I can understand better? Was it 2 or 4 under "Create a sign-up and sign-in user flow?"

@James-Hamil-MSFT, it was trying to understand what Steps 2 through to 4 were trying to convey.
It may be just be me, but it is confusing to know the distinction between managing the Azure B2C instance and being inside of the Tenant itself. Screenshots showing this distinction would be quite helpful to be clear about the area a person is meant to be in.

Hi @stephajn , I created a pull request to make the doc clearer. I didn't add any screenshots, but I tried to make the wording easier to understand.
Best,
James


docs: write docs for setting up the project in the local dev environment

work
write docs for setting up the project in the local dev environment
Fixes #4

Preview

Congrats on merging pull request!


Error module for logging errors

Replaced all the assert statements with error module.
The structure for errors is defined in wiki. Please refer to this standard moving forward.

Can you also merge changes from release-v4.3.0?


Let developers associate lifecycle events

Currently there is no way to know which events are tied to a given user action. For example, it's not possible to associate a turbo:click with a turbo:visit. One might link a turbo:click with the next turbo:visit, but this isn't accurate because a navigation can be ended by cancelling turbo:click or turbo:before-visit (as mentioned by @pfeiffer in https://github.com/hotwired/turbo/issues/99#issuecomment-757535307).
With a lifecycle ID present in each event, it'll be possible to reference the initiator element, providing a way for developers to customise visit behaviour based on HTML attributes. For example:
let initiator = []
addEventListener('turbo:click', ({ detail }) =>
  initiator = [detail.lifecycleIdentifier, detail.originalEvent.target]
)
addEventListener('turbo:visit', ({ detail }) => {
  const [id, element] = initiator
  if (detail.lifecycleIdentifier === id && element.dataset.animate) {
    // do something
  }
})

It could also be used to determine redirect visits, as turbo:visit is dispatched twice with the same lifecycle ID:
let lifecycleIdentifier
addEventListener('turbo:visit', ({ detail }) =>
  const isRedirect = detail.lifecycleIdentifier === lifecycleIdentifier
  lifecycleIdentifier = detail.lifecycleIdentifier
)

This is a lower-level alternative to https://github.com/hotwired/turbo/pull/750, and whilst I still think that the type annotations in that PR are worthwhile, this might provide some useful information for other cases without having to manipulate VisitOptions too much.
If we think this approach is worth pursuing, I can finish it up by adding identifiers to the remaining events.

Todo:

[ ] Other events
[ ] Fix back/forward having same ID

Thank you for exploring this option @domchristie!
While I appreciate the simplicity of passing around a uuid string, I wonder how likely it is that applications that adopt this pattern are going to want more and more details about the details from events that precede any given action.
The hypothetical you shared is related to the lifecycle of a Visit instance. While I'd really prefer to not expose internal objects within CustomEvent.detail, I wonder if there is a middle ground between sharing the Visit instance across related events and sharing an abstract uuid string.
Would it be worth pushing each Event instance onto an Array? Capturing an object that adheres to a Delegate interface (maybe like VisitDelegate)? Something else entirely?

Thanks for reviewing @seanpdoyle.
Yes, the idea for a just a UUID string stems from the issue of passing around complex objects that don't conform to the structured clone algorithm (discovered by @kevinmcconnell in https://github.com/hotwired/turbo/issues/720), which caused an error when communicating with the iOS adapter.
Related: when augmenting the code, it's really inviting to add arbitrary properties to VisitOptions. Many of these make sense in terms of modelling (e.g. Visit#initiator:Element feels natural), and can be really handy because VisitOptions are passed around everywhere prior to a Visit, however, this is risky because of the above.
The other consideration is that there currently isn't a model that encompasses the pre-visit events like turbo:click. Perhaps this is a Lifecycle or Navigation?

Would it be worth pushing each Event instance onto an Array? Capturing an object that adheres to a Delegate interface (maybe like VisitDelegate) during a turbo:click, then forwarding that along? Something else entirely?

@seanpdoyle just to clarify, are you suggesting that this array of events (or alternative) be available in the Event object, or referencable via some other API, e.g Turbo.currentLifecycle.events?


Add Quest for Riches Game

PR Description 📜
Added "Quest for Riches" game with complete functionality including player controls, enemy AI, puzzles, and scoring system. Integrated sounds, enhanced game UI, and provided documentation.
Fixes #4505

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generate no new warnings.
[x] I have followed the proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added a screenshot for the website preview in assets/images
[x] I have added entries for my game in the main README.md
[x] I have added README.md in my folder
[x] I have specified the respective issue number for which I have requested the new game.

Add your screenshots(Optional) 📸

Thank you so much for contributing to our repository 💗

Thank you @peculiap1 ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

@ishita-43 @kunjgit  Can you please review this PR? Thanks!


feat: spaces unit tests

Closing ENG-1492

start adding unit tests for spaces

is it the right way to do it or are there better ways or missing code?


Removes Game Explorer from application-installing-and-servicing.md

Game Explorer is a retired feature, so it can be removed from the overview page.

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

Thanks!

Thanks for merging!


Patch for Odroid

Required Info

Camera Model
D435

Firmware Version
SDK2.0, ROS

Operating System & Version
Ubuntu16.04

Kernel Version (Linux Only)
4.14.47-132

Platform
Odroid-XU4

SDK Version
{ legacy / 2.13.0 }

Language
{C/C#/labview/nodejs/opencv/pcl/python/unity }

Segment
Robot

Issue Description
I tried to install the SDK on an Odroid-XU4. When I execute the patch  ./scripts/patch-realsense-ubuntu-odroid.sh  no errors occurred but it finished incomplete.

In Line 36 I don t get into the if-statement because my hostname (uname -n) is not equal. I changed it in my local File but thats not nice.
In Line 107 and 108 link to an not existing path. In path usr/src  is only a different Kernel folder  linux-headers-4.4.0-128 without .config and /Module.symvers Files. Therefore the Patch stops here.

Could somebody help me please?
Without the Patch I get really strange depth images due to wrong format encodings.
Thanks!

[Realsense Customer Engineering Team Comment]
Hi @ipa-fog,
It looks the patch script has some problems there. However, although no patch applied, you should be able to get the normal depth stream. Can you try "rs-capture" first to see if the depth stream is ok?

[Realsense Customer Engineering Team Comment]
Hi @ipa-fog,
As for the patch script, there are some modifications required. you need to get the kernel from below source. Ultimately, you should be able to build 'uvcvideo.ko' to patch some new camera formats. Also, suggest to upgrade to Linux odroid 4.14.52-145 which is the latest. For the file 'Module.symvers', a quick way is to get it from /lib/modules/4.14.xxx/build**.**
kernel_name="odroid_bionic"
ubuntu_codename="bionic"
#[! -d ${kernel_name}] && git clone -b $kernel_branch git://#kernel.ubuntu.com/ubuntu/ubuntu-${ubuntu_codename}.git --depth #1 ./${kernel_name}
[! -d ${kernel_name}] && git clone --depth 1 https://github.com/hardkernel/linux -b odroidxu4-4.14.y ./${kernel_name}
However, still let me know what you mean about "strange depth images due to wrong format encodings". Any error log showing if you run 'rs-capture' or 'realsense-viewer'?

Hi @RealSense-Customer-Engineering
rs-capture is not working because I am using SSH and got this error:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Segmentation fault

But the rs-depth and rs-distance tools are working fine.
I visualize the Depth image with RVIZ (ROS):
https://github.com/ipa-fog/cam_issue/blob/master/Screenshot from 2018-07-05 14-24-58.png
Thanks for your code modification. But now the script break at

dmesg output when I plugin the camera:
[ 4046.035095] usb 4-1.2: new SuperSpeed USB device number 7 using xhci-hcd
[ 4046.056042] usb 4-1.2: New USB device found, idVendor=8086, idProduct=0b07
[ 4046.056050] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4046.056056] usb 4-1.2: Product: Intel(R) RealSense(TM) 435
[ 4046.056061] usb 4-1.2: Manufacturer: Intel(R) RealSense(TM) 435
[ 4046.056066] usb 4-1.2: SerialNumber:<PHONE_NUMBER>77
[ 4046.059731] uvcvideo: Unknown video format 00000050-0000-0010-8000-00aa00389b71
[ 4046.059745] uvcvideo: Unknown video format 00000032-0000-0010-8000-00aa00389b71
[ 4046.059962] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 435 (8086:0b07)
[ 4046.060811] uvcvideo: Unable to create debugfs 4-7 directory.
[ 4046.060927] uvcvideo 4-1.2:1.0: Entity type for entity Intel(R) RealSense(TM) 435 with was not initialized!
[ 4046.060934] uvcvideo 4-1.2:1.0: Entity type for entity Processing 2 was not initialized!
[ 4046.060943] uvcvideo 4-1.2:1.0: Entity type for entity Intel(R) RealSense(TM) 435 with was not initialized!
[ 4046.060949] uvcvideo 4-1.2:1.0: Entity type for entity Camera 1 was not initialized!
[ 4046.061175] input: Intel(R) RealSense(TM) 435: Int as /devices/platform/soc/soc:usb3-0/12000000.dwc3/xhci-hcd.3.auto/usb4/4-1/4-1.2/4-1.2:1.0/input/input5
[ 4046.062274] uvcvideo: Unknown video format 36315752-1a66-a242-9065-d01814a8ef8a
[ 4046.062285] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 435 (8086:0b07)
[ 4046.062657] uvcvideo: Unable to create debugfs 4-7 directory.
[ 4046.062819] uvcvideo 4-1.2:1.3: Entity type for entity Processing 7 was not initialized!
[ 4046.062828] uvcvideo 4-1.2:1.3: Entity type for entity Extension 8 was not initialized!
[ 4046.062836] uvcvideo 4-1.2:1.3: Entity type for entity Camera 6 was not initialized!

dmesg when the Camera is running with ROS

[ 4128.110902] ------------[ cut here ]------------
[ 4128.110933] WARNING: CPU: 1 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.110938] Unknown pixelformat 0x00000000
[ 4128.110941] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.110991] CPU: 1 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.110994] Hardware name: ODROID-XU4
[ 4128.111016] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.111030] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.111046] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.111056] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.111066] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.111077] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.111086] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.111097] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.111106] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.111117] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.111122] ---[ end trace 48b4c1154651863d ]---
[ 4128.113272] ------------[ cut here ]------------
[ 4128.113296] WARNING: CPU: 1 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.113301] Unknown pixelformat 0x00000000
[ 4128.113304] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.113350] CPU: 1 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.113354] Hardware name: ODROID-XU4
[ 4128.113372] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.113385] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.113399] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.113409] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.113419] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.113430] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.113438] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.113448] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.113456] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.113467] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.113471] ---[ end trace 48b4c1154651863e ]---
[ 4128.140931] ------------[ cut here ]------------
[ 4128.140962] WARNING: CPU: 1 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.140967] Unknown pixelformat 0x00000000
[ 4128.140971] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.141021] CPU: 1 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.141024] Hardware name: ODROID-XU4
[ 4128.141046] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.141059] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.141075] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.141085] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.141095] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.141106] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.141115] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.141126] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.141134] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.141146] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.141151] ---[ end trace 48b4c1154651863f ]---
[ 4128.233017] ------------[ cut here ]------------
[ 4128.233040] WARNING: CPU: 7 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.233046] Unknown pixelformat 0x00000000
[ 4128.233052] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.233142] CPU: 7 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.233147] Hardware name: ODROID-XU4
[ 4128.233163] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.233174] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.233185] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.233195] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.233206] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.233215] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.233222] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.233232] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.233239] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.233248] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.233254] ---[ end trace 48b4c11546518640 ]---
[ 4128.233964] ------------[ cut here ]------------
[ 4128.233976] WARNING: CPU: 7 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.233980] Unknown pixelformat 0x00000000
[ 4128.233985] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.234048] CPU: 7 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.234052] Hardware name: ODROID-XU4
[ 4128.234063] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.234071] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.234082] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.234091] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.234100] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.234107] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.234114] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.234122] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.234129] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.234136] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.234141] ---[ end trace 48b4c11546518641 ]---
[ 4128.242226] ------------[ cut here ]------------
[ 4128.242245] WARNING: CPU: 4 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.242250] Unknown pixelformat 0x00000000
[ 4128.242255] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.242319] CPU: 4 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.242324] Hardware name: ODROID-XU4
[ 4128.242338] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.242349] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.242359] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.242367] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.242376] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.242385] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.242393] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.242402] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.242409] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.242417] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.242422] ---[ end trace 48b4c11546518642 ]---
[ 4128.243122] ------------[ cut here ]------------
[ 4128.243136] WARNING: CPU: 4 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.243143] Unknown pixelformat 0x00000000
[ 4128.243152] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.243336] CPU: 4 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.243344] Hardware name: ODROID-XU4
[ 4128.243358] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.243374] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.243385] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.243395] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.243405] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.243414] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.243423] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.243432] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.243440] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.243450] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.243456] ---[ end trace 48b4c11546518643 ]---
[ 4128.243604] ------------[ cut here ]------------
[ 4128.243614] WARNING: CPU: 4 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.243620] Unknown pixelformat 0x00000000
[ 4128.243626] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.243709] CPU: 4 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.243714] Hardware name: ODROID-XU4
[ 4128.243722] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.243731] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.243741] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.243750] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.243762] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.243775] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.243783] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.243793] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.243801] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.243810] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.243817] ---[ end trace 48b4c11546518644 ]---
[ 4128.262565] ------------[ cut here ]------------
[ 4128.262583] WARNING: CPU: 4 PID: 20529 at drivers/media/v4l2-core/v4l2-ioctl.c:1288 v4l_enum_fmt+0x1034/0x1780
[ 4128.262587] Unknown pixelformat 0x00000000
[ 4128.262591] Modules linked in: fuse tun uvcvideo videobuf2_vmalloc cfg80211 rfkill spidev binfmt_misc evdev spi_s3c64xx uio_pdrv_genirq uio gpio_keys extcon_usb_gpio exynos_gpiomem ipv6
[ 4128.262649] CPU: 4 PID: 20529 Comm: nodelet Tainted: G        W       4.14.40-131 #1
[ 4128.262654] Hardware name: ODROID-XU4
[ 4128.262667] [<c0110b14>] (unwind_backtrace) from [<c010ce98>] (show_stack+0x10/0x14)
[ 4128.262677] [<c010ce98>] (show_stack) from [<c08a7ff4>] (dump_stack+0x84/0x98)
[ 4128.262687] [<c08a7ff4>] (dump_stack) from [<c01242cc>] (__warn+0xec/0x104)
[ 4128.262694] [<c01242cc>] (__warn) from [<c012431c>] (warn_slowpath_fmt+0x38/0x48)
[ 4128.262702] [<c012431c>] (warn_slowpath_fmt) from [<c069bff0>] (v4l_enum_fmt+0x1034/0x1780)
[ 4128.262711] [<c069bff0>] (v4l_enum_fmt) from [<c0699aac>] (__video_do_ioctl+0x2a0/0x2fc)
[ 4128.262717] [<c0699aac>] (__video_do_ioctl) from [<c06993d8>] (video_usercopy+0x264/0x68c)
[ 4128.262726] [<c06993d8>] (video_usercopy) from [<c0297590>] (do_vfs_ioctl+0x9c/0x8e0)
[ 4128.262732] [<c0297590>] (do_vfs_ioctl) from [<c0297e08>] (SyS_ioctl+0x34/0x5c)
[ 4128.262740] [<c0297e08>] (SyS_ioctl) from [<c0108780>] (ret_fast_syscall+0x0/0x54)
[ 4128.262745] ---[ end trace 48b4c11546518645 ]---
[ 4128.287463] uvcvideo: Failed to query (SET_CUR) UVC control 11 on unit 3: -32 (exp. 1).
[ 4128.344387] uvcvideo: Failed to query (SET_CUR) UVC control 11 on unit 3: -32 (exp. 1).
[ 4128.401725] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 4128.458845] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 4128.522703] uvcvideo: Failed to query (GET_CUR) UVC control 1 on unit 3: -32 (exp. 1024).
[ 4128.581045] uvcvideo: Failed to query (SET_CUR) UVC control 3 on unit 3: -32 (exp. 4).
[ 4128.637809] uvcvideo: Failed to query (SET_CUR) UVC control 3 on unit 3: -32 (exp. 4).

[Realsense Customer Engineering Team Comment]
Hi @ipa-fog,
Per my quick test of kernel 4.14.37-135 and 4.14.52-145, 'rs-capture' tool can work normally. Need to further check your issue.
I will also create a modified patch script for reference. Stay tuned.

[Realsense Customer Engineering Team Comment]
Hi @ipa-fog,
Please try below script for Odroid XU4. Note: This is verified based on kernel 4.14.52-145.
https://github.com/freemanlo/librealsense/blob/odroid_build/scripts/patch-realsense-ubuntu-odroid-xu4-4.14.sh

[Realsense Customer Engineering Team Comment]
Hi @ipa-fog,
How does it work for you?

Hi @RealSense-Customer-Engineering,
I tried your patch on a fresh Ubuntu installation. The script is running fine. I only had to modify Line 107 and 108 because in usr/src  was again no folder of the current kernel . I set the link as you proposed to:
# Copy configuration
sudo cp /lib/modules/$(uname -r)/build/.config .
sudo cp /lib/modules/$(uname -r)/build/Module.symvers .

Finally when I plug in the camera and run dmesg I get no more "unknown format errors"

[ 3194.498384] usb 4-1.2: new SuperSpeed USB device number 4 using xhci-hcd
[ 3194.519088] usb 4-1.2: New USB device found, idVendor=8086, idProduct=0b07
[ 3194.519096] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3194.519101] usb 4-1.2: Product: Intel(R) RealSense(TM) 430
[ 3194.519106] usb 4-1.2: Manufacturer: Intel(R) RealSense(TM) 430
[ 3194.519110] usb 4-1.2: SerialNumber:<PHONE_NUMBER>65
[ 3194.529072] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 430 (8086:0b07)
[ 3194.529880] uvcvideo: Unable to create debugfs 4-4 directory.
[ 3194.529978] uvcvideo 4-1.2:1.0: Entity type for entity Intel(R) RealSense(TM) 430 with was not initialized!
[ 3194.529985] uvcvideo 4-1.2:1.0: Entity type for entity Processing 2 was not initialized!
[ 3194.529991] uvcvideo 4-1.2:1.0: Entity type for entity Intel(R) RealSense(TM) 430 with was not initialized!
[ 3194.529997] uvcvideo 4-1.2:1.0: Entity type for entity Camera 1 was not initialized!
[ 3194.530184] input: Intel(R) RealSense(TM) 430: Int as /devices/platform/soc/soc:usb3-0/12000000.dwc3/xhci-hcd.3.auto/usb4/4-1/4-1.2/4-1.2:1.0/input/input2
[ 3194.531168] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 430 (8086:0b07)
[ 3194.531618] uvcvideo: Unable to create debugfs 4-4 directory.
[ 3194.531748] uvcvideo 4-1.2:1.3: Entity type for entity Processing 7 was not initialized!
[ 3194.531756] uvcvideo 4-1.2:1.3: Entity type for entity Extension 8 was not initialized!
[ 3194.531763] uvcvideo 4-1.2:1.3: Entity type for entity Camera 6 was not initialized!

Thanks @RealSense-Customer-Engineering for the updated patch file. I tried several times to go through the compilation, I even built kernel 4.14.52-145 as you tested the installation on it, and I keep hitting the dead end "uvcvideo: Unable to create debugfs 3-3 directory". I believe that's the same issue as @ipa-fog.
Running dmesg:
[  125.039039] usb 4-1.2: USB disconnect, device number 3
[  169.135360] usb 3-1.2: new high-speed USB device number 3 using xhci-hcd
[  169.236109] usb 3-1.2: New USB device found, idVendor=8086, idProduct=0b07
[  169.236116] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  169.236121] usb 3-1.2: Product: Intel(R) RealSense(TM) 435
[  169.236127] usb 3-1.2: Manufacturer: Intel(R) RealSense(TM) 435
[  169.251469] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 435 (8086:0b07)
[  169.252232] uvcvideo: Unable to create debugfs 3-3 directory.
[  169.252334] uvcvideo 3-1.2:1.0: Entity type for entity Intel(R) RealSense(TM) 435 with was not initialized!
[  169.252341] uvcvideo 3-1.2:1.0: Entity type for entity Processing 2 was not initialized!
[  169.252347] uvcvideo 3-1.2:1.0: Entity type for entity Intel(R) RealSense(TM) 435 with was not initialized!
[  169.252353] uvcvideo 3-1.2:1.0: Entity type for entity Camera 1 was not initialized!
[  169.252574] input: Intel(R) RealSense(TM) 435: Int as /devices/platform/soc/soc:usb3-0/12000000.dwc3/xhci-hcd.3.auto/usb3/3-1/3-1.2/3-1.2:1.0/input/input2
[  169.253479] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) 435 (8086:0b07)
[  169.253843] uvcvideo: Unable to create debugfs 3-3 directory.
[  169.253948] uvcvideo 3-1.2:1.3: Entity type for entity Processing 7 was not initialized!
[  169.253955] uvcvideo 3-1.2:1.3: Entity type for entity Extension 8 was not initialized!
[  169.253961] uvcvideo 3-1.2:1.3: Entity type for entity Camera 6 was not initialized!

Any help would be appreciated.

Hi @amerkay,
I have modified the patch script according to your comment. Do you successfully apply the patch and D435 can stream normally?

Hey @freemanlo,
Yes. It worked fine. Note it did not work on the 20171213 image minimal, as the /lib/modules/4.14.69-135/build was not available, that's the minimal ODROID image.

Hi,
Did anyone tried on 4.14.94-155? I am able to compile but when I run ROS, the camera cannot be detected.


249500 - [High][Newsroom][Site Features and Functionality] - News Posting - Media Content - Youtube video not rendering

Severity - 2 - High
Issue: Youtube video not rendering properly:
Expected:
https://newsroom.accenture.jp/jp/news/release-20220427-2.htm

Actual:
https://main--accenture-newsroom-jp--hlxsites.hlx.page/jp/news/2022/release-20220427-2

Azdo link - https://dev.azure.com/accenturecio26/WebContentDigAssetMgmt_PR1093/_workitems/edit/249500
CC: @ravkiran @amol-anand @raymond-h-dev

You can create the video block like this for embedding youtube videos


Add support for Python Requests

Yeah, the requests library is the canonical way to do HTTP requests in Python. It should be the default "target" for httpsnippet's Python snippet.

:+1:

Thanks for the suggestion! I did a quick search through the source and it looks like it does not support custom HTTP methods, @ahmadnassri let's define a way to handle this as it's the same case in some other libraries.
For reference: http://docs.python-requests.org/en/latest/

@montanaflynn
In [1]: import requests

In [2]: requests.request('BLAH', 'http://google.com')
Out[2]: <Response [405]>

Good looking out, I don't know why I didn't find that the first time around... here's the doc http://docs.python-requests.org/en/latest/api/#requests.request

I got the basic implementation done, although there's a few niceties that were left out.
https://github.com/Mashape/httpsnippet/pull/46

closing this ticket, niceties, can be a separate issue if needed.


NextAuth.js working with ZBD API for OAuth2

Task
General
We want to have a starter kit for a ZBD API + NextAuth.js flow such that it becomes trivial for folks to add ZBD Login to any NextJS applications they are building. To do so we must configure custom flows for authorization, userinfo, etc, in the NextAuth settings.
The starter template code repo has been setup here, and an initial custom provider settings has been created. The goal of this task is to get this working 100% such that NextAuth can easily work with ZBD API and we have source code to point users to.
ZBD API
The following client_id and client_secret can be used:
clientId: f9efbdd2-5621-4bd6-aa3a-a5619179ddf5
clientSecret: 8f54c83f-323c-4e4c-838a-3c2792082c2b
The following callbackUrl have been setup on the ZBD API side of things, but happy to add/switch to anything necessary:
http://localhost:3000/api/auth/zbd
Resources

zbd.dev --> for all things ZBD API

https://zbd.dev/api-reference/oauth2/authorization
https://zbd.dev/api-reference/oauth2/fetch-access-token
https://zbd.dev/api-reference/oauth2/refresh-token
https://zbd.dev/api-reference/oauth2/get-user
https://zbd.dev/api-reference/oauth2/get-wallet
https://zbd.dev/docs/zbd-login/integration

NextAuth

Demo: https://next-auth-example.vercel.app/
Custom OAuth2 Provider Docs: https://next-auth.js.org/configuration/providers/oauth#using-a-custom-provider

Contact
@nirgal-soft @zantoshi and @andrerfneves can support in any questions / issues.

/bounty 50

/bounty 50

/attempt #1

@andrerfneves I think you need to update the callback to /api/auth/callback/zbd instead

Right now it's pointing to http://localhost:3000/api/auth/zbd.

Ah nice catch. I just set it to both just in case:

Awesome!

For my user, it says OAuth2 not found when I try to log in, can you help there? What do I need to ZBD to find my OAuth2?

Hmm, it's probably the scope that's incorrect? What scope are you passing?

scope: "user"

Don't see any examples here to use anything other than "user"

Can you try scope as user wallet?

@vlimag any idea why this could be triggering error for this scope?

@andrerfneves
Somehow I got 401 after the login issue was resolved.

I don't believe you need to pass an API Key on the header of the request to the ZBD API so that shouldn't be the issue. Hmmm

Sending in a recording

Hmmm seems like an API access issue tho. I'll be sending a recording in about 45 mins.

Or before if I get the errand done quickly.

@andrerfneves can I also try this ?

/attempt #1

Aight, I'm back

@andrerfneves can you give me a sample api key to test this with?

@rockingrohit9639 we already have @rishi-raj-jain completing this. I will create other similar bounties that you can try.

So to fetch user info https://zbd.dev/api-reference/oauth2/get-user the apikey header is required

I created one from dashboard.z... and printed the access_token generated

and then put the values here but it fails

Ah so you got a Live API Key from ZBD dashboard and it cleared? Needing API key for the user and wallet fetching endpoints make sense.

Okay I need to have @vlimag help here

@rockingrohit9639 we already have @rishi-raj-jain completing this. I will create other similar bounties that you can try.

Ok thanks

@andrerfneves can you approve my account? feel free to delete once this is done. Email with the account<EMAIL_ADDRESS>

this fails with what I get from the api key in the sandbox

I think now you can approve it quickly

Live API Key here: TsKq6BWl28B3hEYUw0ZHTuvFpPa1n8PC
Will try and get your user approved asap

For the same project that uses the OAuth2 keys, so the right project live API Key

That worked wohooo!

now solving the user

How do I get the name of the user? or I can ignore it?

Done! Creating PR


Replaced typings directory with @types packages.

Fixes #579.
Replaced node, mocha and chai typings files with the corresponding @types packages. react, require and underscore didn't appear to be used by anything.

Windows build failures from a timeout (link):

  1) noCookiesRule
       should not produce violations:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Users\travis\build\Microsoft\tslint-microsoft-contrib\dist\src\tests\NoCookiesTests.js)

The command "npm test" exited with 1.

I'll increase the timeout separately. Please hold...

Merged #609 so the one test timeout should go away.


Refactor Validating Webhooks

Is there a related GitHub Issue?
#1174
What is this change about?
This PR refactors the validating webhooks to use the pattern described in this article instead of registering custom handlers.
Does this PR introduce a breaking change?
No
Acceptance Steps
Tests pass and validation rules are still applied.
Tag your pair, your PM, and/or team
@Birdrock

ToDo:

Refactor CFSpace validating webhook (blocked on #1167)
Refactor similar validating webhooks (the ones that make use of a duplicate validator) to avoid code duplication. For example, the code that converts the error returned by the duplicate validator could be moved into the duplicate validator itself.

Thanks for taking a look at this @kieron-dev and @danail-branekov.

When looking at this with @danail-branekov, we talked about whether it would be nice to separate the different validations into composable types. It might be good, but I guess that's not really the object of this PR though and would require a bit of framework code.

I definitely think that this has helped to surface some potential refactors such as this, but I agree that it would be better to create follow-on chores for them, rather than delay getting this merged.

Should the *_validation files be renamed *_validator to match the types btw?

Definitely. I'll add it to the list of items to complete before merging this.

Note that we are about to introduce a CFTask validator with PR https://github.com/cloudfoundry/korifi/pull/1200, could you please consider it as well when rebasing the PR?

BTW, it is worth mentioning that the kubebuilder book suggests that validation is implemented on top of the crd type itself, rather than having a separate validator type. This has the benefit that the validators would not need to cast the generic runtime object to a specific type before actually performing the validation.

Most (if not all) of the validating webhooks make use of K8s clients, duplicate validators, and placement validators to check for other resources on the cluster. If we implement the validators on top of the CRD types, we would have to add these things to the type structs, which would pollute them. This felt like a cleaner solution.


Fix multiple typos under "content/en/docs/reference"

Fix multiple typos under content/en/docs/reference

Some backgrounds on how theses typos are fixed, I've wrote a (Chinese) blog about this: https://nova.moe/fast-typo-fix/ (English version: https://nova.moe/fast-typo-fix-en/) 😇

/lgtm
Thanks!

/retitle Fix multiple typos under "content/en/docs/reference"
We avoid markdown in commit messages.

/hold
Refer https://github.com/kubernetes/website/pull/46178#pullrequestreview-2039349602
Instead of modifying the generated pages directly, it would be more effective to either regenerate all the reference documentation incorporating upstream fixes or consider excluding the auto-generated pages from this pull request altogether.
Feel free to unhold this once either of the above actions has been taken.

Thanks @dipesh-rawat , I've created a PR at https://github.com/kubernetes/kubernetes/pull/124696 which will fix those typos in upstream.

The changes proposed in this PR will be overwritten as these files are auto generated.
The changes should be at the source

With this PR's current lifecycle state "lifecycle/rotten" and the changes proposed here are for autogenerated files and should be changed at their source instead, I'm closing this PR
Feel free to reopen this PR with /reopen in a comment if you feel otherwise
/close


CI: Auto-format on merge

CI Failing because you forgot to do a yarn lint?
Quickly updating a file on the fly without your code editor?
No problem! Github auto format on merge to the rescue!
No more waiting time for format, less github runners means more money!
TODO:

[ ] GH Action for cargo fmt
[ ] GH Action for yarn lint
[ ] GH Action for python yapf

Pros:

Automation for everyone

Cons:

Possible code injection when formatter gets hijacked

My 2 cents, I think we should all take 10mins to automate this on our local setup and then I don't see why it would be required in the CI.
Conceptually, I do not feel comfortable with the idea of merging unseen and unapproved code, sounds like unnecessarily opening ourselves to potential security risks.

I think the benefits outweigh the risks here, and I don't think formatting alone should hold back a PR.

The team voted in favour of local formatting only.


[Web][HTML] Text is not rendered correctly with browser language

I was using flutter on web (flutter run   -d chrome --web-renderer html ), but when I set fontSize to 11 or less, the Text cannot be rendered correctly.

Here is my code
 @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
      child: Column(
        children: [
          Text("(单个文件最大上传1GB)"),
          Text(
            "(单个文件最大上传1GB)",
            style: TextStyle(
                color: Color.fromARGB(255, 151, 151, 151), fontSize: 9),
          )
        ],
      ),
    ));
  }

These 2 sentences are the same, but after set style to the second sentence, words are overlapped.
flutter version
[✓] Flutter (Channel stable, 3.3.10, on Microsoft Windows [�汾 10.0.22621.963], locale zh-CN)
• Flutter version 3.3.10 on channel stable at D:\flutter\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (7 days ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at D:\androidSDK
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.1)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.3.32811.315
• Windows 10 SDK version 10.0.19041.0
[✓] Android Studio (version 4.1)
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] Connected device (3 available)
• Windows (desktop) • windows • windows-x64    • Microsoft Windows [�汾 10.0.22621.963]
• Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.125
• Edge (web)        • edge    • web-javascript • Microsoft Edge 108.0.1462.54
[✓] HTTP Host Availability
• All required HTTP hosts are available

Thanks for the report @guchengxi1994
I am unable to replicate the behavior you are reporting. I tried your code sample and ran it on web with html renderer, but didn't see text overlapping using both versions (stable and master)

From the screenshot you shared, I don't see the text overlapping. I used fontSize: 14, but still didn't observe the text overlapping:

Please provide exact steps to replicate and relevant details.

@darshankawar  I was using html renderer on web, not the canvaskit renderer.

I think it maybe a bug only with html renderer

Thanks for the update. But I am unable to replicate it. As I verified earlier, I tried using html renderer as well with which the text didn't overlap.
Can you try on latest master and see if you still get same behavior or not ?
flutter channel master
flutter upgrade

@darshankawar

flutter doctor -v

but on v3.0.5, the text rendered correctly.

@guchengxi1994 I can reproduce this issue on the latest stable and master channels after changing Chrome display language to Chinese.

Canvaskit: ✅
HTML: ❌

✅: No Issue ❌: Issue reproduced

Complete sample code
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        body: Center(
          child: Column(
            children: [
              Text("(单个文件最大上传1GB)"),
              Text(
                "(单个文件最大上传1GB)",
                style: TextStyle(
                    color: Color.fromARGB(255, 151, 151, 151), fontSize: 9),
              )
            ],
          ),
        ),
      ),
    );
  }
}

flutter doctor -v (stable & master)
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19045.2364], locale en-US)
    • Flutter version 3.3.10 on channel stable at C:\WIP\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (4 days ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at C:\AndroidSDK
    • Platform android-32, build-tools 32.0.0
    • ANDROID_HOME = C:\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at D:\DOWNLOADWORK\VS2022
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[!] Android Studio (version 2022.1)
    • Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    X Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[√] VS Code (version 1.73.1)
    • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.52.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.2364]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.125
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 107.0.1418.35

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

C:\Users\ADMIN>flutterm doctor -v
[!] Flutter (Channel master, 3.7.0-13.0.pre.68, on Microsoft Windows [Version 10.0.19045.2364], locale en-US)
    • Flutter version 3.7.0-13.0.pre.68 on channel master at C:\WIP\flutter_master
    ! Warning: `flutter` on your path resolves to C:\WIP\flutter\bin\flutter, which is not inside your current
      Flutter SDK checkout at C:\WIP\flutter_master. Consider adding C:\WIP\flutter_master\bin to the front of your
      path.
    ! Warning: `dart` on your path resolves to C:\WIP\flutter\bin\dart, which is not inside your current Flutter SDK
      checkout at C:\WIP\flutter_master. Consider adding C:\WIP\flutter_master\bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 239f80ed6c (8 hours ago), 2022-12-25 14:48:16 -0500
    • Engine revision 3ae55014ff
    • Dart version 3.0.0 (build 3.0.0-63.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git"
      directly to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at C:\AndroidSDK
    • Platform android-32, build-tools 32.0.0
    • ANDROID_HOME = C:\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at D:\DOWNLOADWORK\VS2022
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[!] Android Studio (version 2022.1)
    • Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    X Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[√] VS Code (version 1.74.2)
    • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.56.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.2364]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.125
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 108.0.1462.54

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

@mdebbar couldn't reproduce the issue on his end. Any advice @huycozy on extra steps to repro this? (Does this require the browser to be running on Windows, or a specific version of Chrome, for example?)

Any advice @huycozy on extra steps to repro this? (Does this require the browser to be running on Windows, or a specific version of Chrome, for example?)

@ditman I was reproducing this issue on Windows same as OP. I'm using Chrome on Windows (108.0.5359.125 (Official Build) (64-bit)).
Steps to reproduce

Open Chrome Settings
Go to Language > Add languages > Add Chinese (Traditional)
From Chinese (Traditional) menu (three dot icon) > Display Google Chrome in this language (It seems this funtion is only on Windows since I don't see it from Chrome on MacOS)
Click on Relaunch Chrome
After Chrome relaunched, open built Flutter web to see the issue

Demo video:

So this looks like a browser-on-windows issue, and not generalized? Is this limited to chrome, or does it happen with Firefox too?

So this looks like a browser-on-windows issue, and not generalized? Is this limited to chrome, or does it happen with Firefox too?

It seems to be window specific issue since I can not reproduce it on macOS. Below are results:

Windows:

Chrome
MS Edge
Firefox

❌
❌
✅

macOS:

Chrome
Firefox

✅
✅

✅: No Issue ❌: Issue reproduced


test: increase vm stop timeout to 90s

Signed-off-by: Sam Berning<EMAIL_ADDRESS>Issue #, if available: https://github.com/runfinch/finch/issues/140
Description of changes:
Increases the finch vm stop timeout in e2e tests to 90 seconds.
In our CI/CD we've been seeing timeouts on most runs on ARM 11.7 instances, and occasionally on ARM 12.6 instances. Out of the 19 times that the finch vm stop command runs per run of the e2e tests, it tends to timeout only once or twice at most.
I've observed a couple of times on my local machine that finch vm stop can take 40-50 seconds, so it's reasonable to believe that increasing the timeout by another 30 seconds would eliminate most of these timeouts.
Testing done:
make test-e2e

[x] I've reviewed the guidance in CONTRIBUTING.md

License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Would be good to get to the root cause of why vm stop is taking so long to begin with

yeah, I didn't end up root causing it when I saw it earlier. I've been trying to reproduce it on my machine today to take a look at the Lima hostagent logs, but no luck so far.

Just an interesting note, we saw one instance in the e2e tests on this PR where the finch vm stop command took exactly 60s. From the ARM 11.7 logs:
time="2023-01-26T23:37:58Z" level=info msg="Stopping existing Finch virtual machine..."
time="2023-01-26T23:38:58Z" level=info msg="Finch virtual machine stopped successfully"


setupFilesAfterEnv is executed after jest.mock()

🐛 Bug Report
setupFilesAfterEnv is executed after jest.mock(). This is causing fatal error in jest.mock() in case if setupFilesAfterEnv is trying to polyfill react missing features (for example, createContext).
The workaround is to use jest.doMock() but I guess it is better to have setupFilesAfterEnv executed always before both jest.mock() and jest.doMock().
To Reproduce
git clone https://github.com/sormy/jest-bug-8711
cd jest-bug-8711
npm test

Error:
 Test suite failed to run

    TypeError: _react.default.createContext is not a function

      1 | import React from "react"
      2 |
    > 3 | export const CustomContext = React.createContext({ something: "string" })
        |                                    ^
      4 |

      at Object.createContext (lib/CustomContext.ts:3:36)
      at Object.<anonymous> (lib/index.ts:1:1)
      at Object.<anonymous> (src/testConsumer.ts:1:1)
      at Object.<anonymous> (test/testConsumerFAIL.test.ts:1:1)

Expected behavior
setupFilesAfterEnv should be executed always before both jest.mock() and jest.doMock().
Link to repl or repo (highly encouraged)
https://github.com/sormy/jest-bug-8711
Run npx envinfo --preset jest
Paste the results here:
  System:
    OS: macOS Sierra 10.12.6
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
  Binaries:
    Node: 12.5.0 - /usr/local/bin/node
    Yarn: 1.17.0 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  npmPackages:
    jest: ^24.8.0 => 24.8.0

Yes, please add a reproduction :) I don't know where your jest.mock calls are

Here it is: https://github.com/sormy/jest-bug-8711

As a workaround empty module could be imported from library before any exports. It will be noop when build system will import it but on jest level this module could be overriden using moduleNameMapper. This will cause some setup/polyfill logic to be executed during jest.mock() even without setupFilesAfterEnv.
my-lib/index.js:
import "./react-jest"
export * from "..."

my-lib/react-jest.js:
// override in jest to run custom initialization

my-app/app.test.js:
jest.mock("my-lib")

...

my-app/jest.config.js:
module.exports = {
  ...
  setupFilesAfterEnv: [
     require.resolve("./react-polyfill.js"),
  ],
  moduleNameMapper: {
    "\/react-jest$": require.resolve("./react-polyfill"),
    ...
  },
  ...
}

my-app/react-polyfill.js:
import React from "react"

import createContext from "create-react-context"

if (!React.createContext) {
  React.createContext = createContext
}

I have the same issue, so I'm trying to use doMock but it doesn't work with me, I added the following code inside the test function but it doesn't work, am I missing something here? and thanks in advance @sormy
        jest.resetModules();
        jest.doMock("../src/service/axiosRequests.ts", () => ({
            post: jest.fn(() => ({}))
}));
        require('../src/service/axiosRequests.ts');

@AmrAnwar I guess it is not the same issue.

@AmrAnwar I guess it is not the same issue.

I added here in more details if you've any idea I'll be thankful to you,
https://stackoverflow.com/questions/63157643/mock-functions-dont-work-in-test-files-after-adding-setupfilesafterenv


RL refactor

Is this ready for review?

@alibillalhammoud

@msaligane not yet. I am currently rerunning on a fresh machine to verify all package versions I have listed in the requirements file are correct. Should be ready by Monday.

Ok all good now. This PR is ready to merge

Otherwise lgtm!

@msaligane this can be merged.


Fix Webpack's misused require function error

A Webpack error is produced when attempting to build any project that requires or imports the moment-precise-range plugin:
WARNING in ./~/moment-precise-range-plugin/moment-precise-range.js
Critical dependencies:
1:37-44 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/moment-precise-range-plugin/moment-precise-range.js 1:37-44

The issue goes away if you make this change; while still retaining the original purpose of checking for require (i.e. to ensure require can be called).

@andfaulkner thanks for the fix


Upgrade to core 11.5.2

Requires https://github.com/realm/realm-core/pull/4972 first.

Also needs https://github.com/realm/realm-core/pull/5008.


HTML JavaScript Security – "Some content has been disabled in this document"

Hey all,
I consistently get the "Some content has been disabled in this document" warning at the bottom of my HTML preview window. Usually it occurs once I add in any amount of JS.
I've marked up the attached screenshot with a few areas of interest:

I've tried all security settings. Currently set to "Allow insecure content."
<iFrame> is where content stops displaying.

Any thoughts?

How are you previewing your HTML file? Are you using Live Preview?

@andreamah Yes

Can you screenshot the extension that you use for previewing?

@andreamah

HTML Preview

This is not supported by our team. We only support the "Live Preview" extension. Please file this with the appropriate extension.


faster and safer numberToString

Awesome, thank you!
You've got a dozen other (seemingly empty) commits in this PR - is it possible to clean that up? Perhaps fork the repo again?
With that out of the way, go ahead and add your name to the AUTHORS file too (might as well do that in the same commit).

Also would you mind describing the benefit?

I guess I'm keen to know how much faster and why is it safer - there are some concepts not used in the project here, just wondering if it's worth introducing those if the benefit isn't great.

It's just type safer.Wrote a test myself it's a bit faster maybe because it's not comparing strings

How about something like if (number.floor == number)

Numeric doesn't have a floor method


Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD

OpenBSD header | DragonFly header | Linux search
For Linux I've used godbolt compiler explorer to get final values where possible.
Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither.
I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a branch with how far I got.

r? @gnzlbg
(rust_highfive has picked a reviewer for you, use r? to override)

:umbrella: The latest upstream changes (presumably #1389) made this pull request unmergeable. Please resolve the merge conflicts.

Needs rebasing.

Done.

@tormol three targets are failing, the failures look real.

Yes, I didn't check back yesterday, but I've started fixing them.

I've dropped the FIOQSIZE commit due to #1391 and the mistake making me doubt the values for the architectures that aren't tested.
I feel more certain about FIONCLEX as the value is similar to FIOCLEX.

Github didn't really show it, but I peeled off / removed the commit that added FIOQSIZE, and CI is now green.

@bors: r+

:pushpin: Commit 2c10c4c8878ff244a5344a9115eb1d8e82b3463d has been approved by gnzlbg

:hourglass: Testing commit 2c10c4c8878ff244a5344a9115eb1d8e82b3463d with merge e0ff1e68b9e34173e9c4c3217d1b0fc81a7d352d...

:sunny: Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing e0ff1e68b9e34173e9c4c3217d1b0fc81a7d352d to master...


another sysext test + /usr/share/oem -> /oem

TODO

[ ] Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
[ ] Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

TODO:

needs a bump in min version for the custom oem test
the /usr/share/oem to /oem change here need to be done in a way that does not affect running tests on alpha, beta and stable. I tried running the tests using mantle with this PR on alpha and the following tests failed:

cl.sysext.boot
systemd.sysext.custom-oem
systemd.sysext.simple
cl.ignition.oem.regular
cl.ignition.oem.reuse

TODO:

needs a bump in min version for the custom oem test
the /usr/share/oem to /oem change here need to be done in a way that does not affect running tests on alpha, beta and stable. I tried running the tests using mantle with this PR on alpha aand the following tests failed:

cl.sysext.boot
systemd.sysext.custom-oem
systemd.sysext.simple
cl.ignition.oem.regular
cl.ignition.oem.reuse

TODO:

needs a bump in min version for the custom oem test

the /usr/share/oem to /oem change here need to be done in a way that does not affect running tests on alpha, beta and stable. I tried running the tests using mantle with this PR on alpha and the following tests failed:

cl.sysext.boot
systemd.sysext.custom-oem (shouldn't be run, needs a min version bump)
systemd.sysext.simple
cl.ignition.oem.regular
cl.ignition.oem.reuse

All done.

The old and new ignition.oem tests seem to be passing on sufficiently new images and old tests too for older versions (as seen in the test run). Before merging this, I'll bump the minversion of the new tests to 3613 or so.


docs PDF: add release-8.2 and remove archived versions

PR Type
configuration changes

Description

Updated branch patterns in docs-cn-postsubmits.yaml and docs-postsubmits.yaml to include support for release-8.2.
Removed support for release-5.0 and release-6.6 in both files.

Changes walkthrough 📝
Relevant filesConfiguration changes

docs-cn-postsubmits.yamlUpdate branch patterns for docs-cn postsubmits

prow-jobs/pingcap/docs/docs-cn-postsubmits.yaml
Updated branch patterns for postsubmits.  Added support for release-8.2.  Removed support for release-5.0 and release-6.6.

+4/-4

docs-postsubmits.yamlUpdate branch patterns for docs postsubmits

prow-jobs/pingcap/docs/docs-postsubmits.yaml
Updated branch patterns for postsubmits.  Added support for release-8.2.  Removed support for release-5.0 and release-6.6.

+4/-4

💡 PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

/lgtm


Change path handling to pathlib

Internal file handling occurs via a mix of pathlib and strings. We should refactor the code to only use the former

Closed by #197


Weird runtime behavior returning the shape of an ndarray

So, I've been for a long while struggling with a runtime segmentation error, and I have finally spotted the probable cause. I pythranized a file problem.py containing:
#pythran export f(float[][][])
import numpy as np
def f(x):
    a,b = x.shape[:2]
    return a,b

Then, when I execute the following script (on a gcloud virtual machine with debian and python version 3.5):
from problem import f
import numpy as np
a = np.array([[[1.], [2.], [3.]]])
print(f(a))

I get random answers like<PHONE_NUMBER>89936, -1). The problem does not show up in my local system (MacOS High Sierra, python 3.7). Is this a pythran issue?

Good news: I can reproduce on Linux. I'm investigating that, thanks a lot for reporting the issue!

got it: the problem is that you're slicing a tuple, and this is not super-well supported in Pythran. However, as the slicing is only composed of compile-time constant, pythran should be able to unfold it at compile time. i'll try this optimization and report back to you!

Good to know! By the way, thanks for this amazing tool.
On Sun, Dec 16, 2018 at 9:53 AM serge-sans-paille<EMAIL_ADDRESS>wrote:

got it: the problem is that you're slicing a tuple, and this is not
super-well supported in Pythran. However, as the slicing is only composed
of compile-time constant, pythran should be able to unfold it at compile
time. i'll try this optimization and report back to you!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/serge-sans-paille/pythran/issues/1143#issuecomment-447626967,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARdku3fF3Wd8YOOJbHeGQJWLDDjsrp0gks5u5goPgaJpZM4ZUXJj
.

--
"Io sono giunto a credere che il mondo intero è un enigma, un enigma
innocuo che è reso terribile dalla nostra pessima idea di interpretarlo
come se avesse una verità fondamentale."
-Umberto Eco


RTrees.ActiveVarCount property should be of type int

The ActiveVarCount property should be of type int.
Currently it is defined as a bool type. This means that only 0 or 1 can be passed to the native runtime library.
https://github.com/shimat/opencvsharp/blob/15d39479fa2e4cef26615ba5b109a8d5d0aba8c0/src/OpenCvSharp/Modules/ml/RTrees.cs#L104
Native runtime library methods are defined as type int.
https://github.com/opencv/opencv/blob/7b399c4248fd6a399f2f5a731864448883fdd364/modules/ml/src/rtrees.cpp#L441-L442

Thank you!
#1612


Add TTF_GetScript to retreive the script to which unicode character belongs

At the moment SDL_ttf provides TTF_SetFontScriptName, a Harfbuzz related function that allows a script to be set (for a specific font) to be used for text shaping.
This is useful as long as the client knows the origin of its texts, allowing him to simply set the script relative to his language. If this isn't the case how would he know what to script to use? And what would happen if there are different characters in his text, each one requiring different scripts?
Harfbuzz already provides a way to obtain the best script to be used by each character. This PR exposes this functionally with TTF_GetScript, allowing the client to deal with this issue however he desires, without compromising the current library implementation

Better after the latest changes. I suggest the following to accomodate @slouken's arguments at https://github.com/libsdl-org/SDL_ttf/pull/312#discussion_r1549876730: it makes it safer, just in case. Also changes some error returns to simply return TTF_SetError(), because TTF_SetError (which is SDL_SetError) already returns -1 (there are other places in existing code that needs a similar change, but that's out of the scope of this PR.)
diff --git a/SDL_ttf.c b/SDL_ttf.c
index d6f6301..54d3575 100644
--- a/SDL_ttf.c
+++ b/SDL_ttf.c
@@ -3143,25 +3143,25 @@ int TTF_SetFontScriptName(TTF_Font *font, const char *script)
 #endif
 }

-extern DECLSPEC int SDLCALL TTF_GetScript(Uint32 ch, char script[5])
+int TTF_GetScript(Uint32 ch, char *script, size_t bufsize)
 {
 #if TTF_USE_HARFBUZZ

     TTF_CHECK_POINTER(script, -1);
+    if (bufsize < 5) {
+        return TTF_SetError("Insufficient script buffer size");
+    }

     hb_buffer_t* hb_buffer = hb_buffer_create();
-
     if (hb_buffer == NULL) {
-        TTF_SetError("Cannot create harfbuzz buffer");
-        return -1;
+        return TTF_SetError("Cannot create harfbuzz buffer");
     }

     hb_unicode_funcs_t* hb_unicode_functions = hb_buffer_get_unicode_funcs(hb_buffer);

     if (hb_unicode_functions == NULL) {
-        TTF_SetError("Cannot get harfbuzz unicode funcs");
         hb_buffer_destroy(hb_buffer);
-        return -1;
+        return TTF_SetError("Cannot get harfbuzz unicode funcs");
     }

     hb_buffer_clear_contents(hb_buffer);
@@ -3179,8 +3179,7 @@ extern DECLSPEC int SDLCALL TTF_GetScript(Uint32 ch, char script[5])
     return 0;

 #else
-    TTF_SetError("Unsupported");
-    return -1;
+    return TTF_SetError("Unsupported");
 #endif
 }

diff --git a/SDL_ttf.h b/SDL_ttf.h
index 03b9045..825bc08 100644
--- a/SDL_ttf.h
+++ b/SDL_ttf.h
@@ -2333,11 +2333,14 @@ extern DECLSPEC int SDLCALL TTF_SetFontScriptName(TTF_Font *font, const char *sc
  * \param ch the character to check.
  * \param script on return, filled in with the the script as a null-terminated
  *               string of exactly 4 characters
+ * \param bufsize size of the script buffer size, must be at least 5 in order
+                  to hold the script as a null-terminated string of exactly 4
+                  characters.
  * \returns 0 on success, or -1 on error.
  *
- * \since This function is available since SDL_ttf ?.
+ * \since This function is available since SDL_ttf 2.24.0.
  */
-extern DECLSPEC int SDLCALL TTF_GetScript(Uint32 ch, char script[5]);
+extern DECLSPEC int SDLCALL TTF_GetScript(Uint32 ch, char *script, size_t bufsize);

 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus

After you apply this, maintainers will review and decide, I guess.

This looks fair to me now. @1bsyl, @slouken: what do you think?

look ok to me!
minor suggestion, since we have the function "TTF_SetFontScriptName()", maybe this should be called TTF_GetScriptName()
also what is the use case ? check the script of a string by the first char ?
If we want to validate a full string, we need a big loop, with per char, an hb_buffer_create/destroy().
Also usefull, could be an helper function to parse a long string, return an array a scripts and indexes of sub strings, for each string that has different scripts.
Or a function that get the script of a string and advance into the string as much as possible (behavior like strstr()).

Hi @1bsyl,
The function has the name "TTF_GetScript()" since we also have the "TTF_SetScript()" and because it is not related with fonts as "TTF_SetFontScriptName()". However, if you still think we should add "Name" at the end, I am ok with it.
Regarding the use of it:
Each character has a defined script. 'A' belongs to the Latin script, while 'ب' belongs to the Arab script, but there are some characters that could be rendered with more than one script, it just depends on the context, for example, the application current language, and, on these cases, it should be decided by the application.
Actually there can be the case where the application could render the whole string just depending on the first character, as is recommended on the unicode.org. But this does not cover all cases, some other applications could want to render the string with multiple scripts (applying them for each chunk) because they have multi-language strings.
If we want to validate a full string, we need a big loop indeed, but if we leave it to the application, now it has the possibility to do some other things on this loop and avoids a loop on the SDL_TTF and another loop on the application.
Again, having a function like strstr() seems a good ideia, but how do we decide what to do on the special cases? Which scripts should we choose?
See more: https://www.unicode.org/reports/tr24/

@Magueija Are you sure, I can't find TTF_SetScript ?!
otherwise I am ok with anything

@1bsyl I just noticed it's deprecated, I will add suffix.
https://wiki.libsdl.org/SDL2_ttf/TTF_SetScript
https://github.com/libsdl-org/SDL_ttf/blob/SDL2/SDL_ttf.h#L2281


Fix require dot literal require('.')

Fixes #66

Codecov Report

Merging #67 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master      #67   +/-   ##
=======================================
  Coverage   90.05%   90.05%
=======================================
  Files          10       10
  Lines         995      995
=======================================
  Hits          896      896
  Misses         99       99

Impacted Files
Coverage Δ

src/resolve-dependency.js
100% <100%> (ø)
:arrow_up:

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 9058c07...706b587. Read the comment docs.