Generate 32 & 64 bit .so file using openssl FIPS

I am seeking help on generating FIPS compliance OpenSSL libs for Android Native Application.
The libssl.so and libcrypto.so file for armeabi-v7a & arm64-v8a (32 & 64 bit) architecture following this link -https://wiki.openssl.org/index.php/FIPS_Library_and_Android
I also tried a script https://github.com/ColdDragon/android-build-openssl-fips found on GitHub that combines the building of the FIPS module and Openssl
Any document that can help to generate .so file, it would be appreciate if can share.

I'd like to jump in on this question too. The platform I have is HPE NonStop (BigEndian) x86. I'm looking for instructions on doing the same as @bhumikaencora but for this platform. The FIPS user guide 2.0 is unclear (to me anyway) on how to do this for OpenSSL 3.0.0.

@rsbeckerca, the FIPS module 2.0 documents do not apply on 3.0. 3.0 is substantially different.
Basically, if you've built providers/fips.so, you have your FIPS module for 3.0. It's not approved as such, or "installed", but it's there.

@rsbeckerca, the FIPS module 2.0 documents do not apply on 3.0. 3.0 is substantially different.
Basically, if you've built providers/fips.so, you have your FIPS module for 3.0. It's not approved as such, or "installed", but it's there.

The $50K question is: "ok, so how does providers/fips.so get built?" I'm not at all certain we're going to deploy this, given the hints that approval costs a whole lot - I'm new to FIPS - never built it in older releases.

never built it in older releases.

The previous (2.0) was a separate package, and worked as a drop in .so for OpenSSL 1.0.2

So far I found one repo that is providing prebuilt but I am able to compile libcrypto.so & libssl.so from code.
https://github.com/zxyang/fips-openssl-android-64bit
I have used ndk-15c. Beyond NDK version 15, getting issue while compiling. From this link, generated links are version one like 1.0.0 but after changing one command in buildopenssl.sh or buildopenssl64.sh, generated libs are without versioning.
If you want to create lib without versioning, use below command instead of 'make'
make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER="
Also change FIPS2.0 path in script.
I followed below version to compiled lib.
NDK version - 15c
Openssl - 1.0.2u
OpensslFIPS-2.0.16


ApplyTrimResultReadTransformer should modify read in-place

Currently, if the read is unmapped the read provided is modified in-place, but in the case of hard-clipping a raw read it is not. This result in incosistency depending if the read is mapped or unmapped.
I prefer modification in-place for make easier #46.

Fixed in 3571910a4ed4672416640e38bf0137f775f32822


OneOf for sealed classes imported from another module

Hi @dzikoysk thank you for the great support of @OneOf for sealed classes. Unfortunately, recently I faced a new issue connected to it.
Previously I had only one submodule requiring OpenAPI spec but recently I got another one. And this second one uses some API classes from the first one. And there I discovered that automatic filling and mapping of @OneOf is not working for sealed classes imported from another module.
After looking into the annotation processor code I realized that it happens because the processor searches for candidate classes for oneOf list – (subtypes of the given sealed class) among the list of classes annotated with @DiscrimnatorMappingName which doesn't include any classes from an external module.
I couldn't find any quick solution to this problem and have to duplicate such classes in every module that uses them.
Do you have any idea of how to make @OneOf work properly (the same way as it works in its own module)? I'm ready to try to implement it if you have one.

It's a little bit tricky, because annotation processing is supposed to work only for current sources - other modules behave quite the same as external dependencies, these sources were already processed and compiled before, so there's no point to repeat that process over and over again.
I don't quite remember the limitations of AP, but assuming we can get an annotation from an external class, maybe we could just extend OneOf annotation, so there's a possibility to explicitly list all mappings. So instead of:
    @OneOf(
        discriminator = Discriminator(
            property = DiscriminatorProperty(
                name = "type",
                type = String::class,
                injectInMappings = true
            )
        )
    )
    sealed interface Union

    @DiscriminatorMappingName("class-a")
    data class A(val a: Int) : Union

    @DiscriminatorMappingName("class-b")
    @OpenApiName("B")
    data class C(val b: String) : Union

we could allow to define it like that:
    @OneOf(
        discriminator = Discriminator(
            property = DiscriminatorProperty(
                name = "type",
                type = String::class,
                mappings = [
                  Mapping("class-a", A::class),
                  Mapping("class-b", B::class),
                ]
            )
        )
    )
    sealed interface Union

    data class A(val a: Int) : Union

    @OpenApiName("B")
    data class C(val b: String) : Union

The only thing that worries me is that this approach assumes that oneOf values can be set in 4 different ways:
where to have mappings [...]

I agree, let's keep it as simple as possible. I didn't pay that much attention into details, I'm completely fine with having mappings at root level, so directly on @OneOf annotation. Let's focus on that, because it should be enough to cover this case.

mapping source priority [...]

I'd personally throw an exception for now - it seems to be simpler. In case someone will face an issue with that, we can always go back to this discussion and implement that having a real world use-case.

So summing up - we'll have pretty much something like that:
@OneOf(
    discriminator = Discriminator(
        property = DiscriminatorProperty(
            name = "type",
            type = String::class,
        )
    ),
    mappings = [
        Mapping("class-a", A::class),
        Mapping("class-b", B::class),
    ]
)
sealed interface Union

Whenever mappings are used, DiscriminatorMappingName will throw an exception to avoid duplicated mappings.
Whenever mappings are used, it replaces default values - in case both are used, it also throws an exception.

If it looks correct to you, feel free to open a PR 🙏


CodeClimate test reporter ID can be safely put in CI.yml

Should I keep my Test Reporter ID secret?
Your repo's test coverage ID is only used to identify your repo when submitting test coverage payloads. It can't be used to access any of your data.
https://docs.codeclimate.com/docs/finding-your-test-coverage-token#should-i-keep-my-test-reporter-id-secret

Fixed.


How to verify a flask web app in the google search console

I have been trying to verify my flask web app in the google search console using the HTML file upload method but when uploading the file to the root directory, it does not appear and raises a 404 error. I also tried putting it in the templates folder but still, 404 was raised. Is there any way I can prevent this behavior and make it work

Define a route that serves the code/file needed for verification. Or configure your web server to serve a file for the verification URI instead of forwarding the request to your Flask app...

Sorry, but the following method did not work. What did work was the authentication via the meta tag.
Steps to do so:

Copy the meta tag for the authentication
Navigate to the HTML file being served on / or your home page
Paste the meta tag in the head tag or the HTML file
Deploy your website
Go to the search console and click authenticate
And You will be done


[𝕎𝚊𝚝𝚌𝚑✓VIDEO𝕊.!!] Chellah Tukuta Viral ᴠɪᴅᴇᴏ ʟᴇᴀᴋᴇᴅ Update On Social Media X Telegram

18 sec ago Chellah Tukuta Viral ʟᴇᴀᴋᴇᴅ ᴠɪᴅᴇᴏ Viral On Social Media. [𝕎𝚊𝚝𝚌𝚑✓VIDEO𝕊.!!] Chellah Tukuta Viral ᴠɪᴅᴇᴏ ʟᴇᴀᴋᴇᴅ Update On Social Media X Telegram
𝑾𝒂𝒕𝒄𝒉 🟢 ➤ ➤ ➤ 🌐 𝖢𝗅𝗂𝖼𝗄 𝖧𝖾𝗋𝖾 𝖳𝗈 𝗅𝗂𝗇𝗄 (𝖥𝗎𝗅 𝗅 𝖵𝗂𝗋𝖺𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇𝗄)
🔴 ➤► 𝖣𝖮𝖶𝖭𝖫𝖮𝖠𝖣👉👉 (𝖥𝗎𝗅𝗅 𝖵𝗂𝗋𝖺𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇 𝗄) 𝖶𝖺𝗍𝖼𝗁
🟢 ➤ ➤ ➤ 🌐 𝖢𝗅𝗂𝖼𝗄 𝖧𝖾𝗋𝖾 𝖳𝗈 𝗅𝗂𝗇𝗄 (𝖥𝗎𝗅𝗅 𝖵𝗂𝗋𝖺 𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇𝗄)
🔴 ➤► 𝖣𝖮𝖶𝖭𝖫𝖮𝖠𝖣👉👉 (𝖥𝗎𝗅𝗅 𝖵𝗂𝗋𝖺𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇 𝗄)
Chellah Tukuta Viral's latest video has taken the internet by storm, sparking lively discussions across various social media platforms. The rising digital influencer, known for her captivating content—especially her recent Spiderman-themed video—has experienced a massive surge in popularity. Fans are eagerly awaiting the full version, while audiences flock to Instagram, X (formerly Twitter), and Discord to engage with her latest creation.
As excitement continues to grow, fans are actively sharing their thoughts online, highlighting the crucial role social media plays in propelling creators like Chellah Tukuta Viral into the spotlight. With her unique style and creative approach, she has made a significant impact on the digital scene, leaving fans excited for what’s to come next.  The rising digital influencer, known for her captivating content—especially her recent Spiderman-themed video—has experienced a massive surge in popularity. Fans are eagerly awaiting the full version, while audiences flock to Instagram, X (formerly Twitter), and Discord to engage with her latest creation.
As excitement continues to grow, fans are actively sharing their thoughts online, highlighting the crucial role social media plays in propelling creators like Chellah Tukuta Viral into the spotlight. With her unique style and creative approach, she has made a significant impact on the digital scene, leaving fans excited for what’s to come next.


[FLINK-8600] Don't use flaky truncate() test in BucketingSink

R: @kl0u

(I realised this doesn't add any tests or anything but BucketingSink is currently problematic with S3 anyways.)

@kl0u Thanks for the review!
I changed the code to check useTruncate before calling. Regarding fsConfig, the settings in there are for FileSystem while the settings that are configured using a setter are for the behaviour of the BucketingSink itself. Does that make sense?

@aljoscha Yes it does. I did not get it in the first place but I think that this clarifies things!

@kl0u I changed my mind on this. 😅 Now the only change is to allow circumventing the truncate() checks via the setting. The checks themselves are still in place. I'm also not changing the call-sites to try and keep the change as localised as possible. WDYT?

+1 to merge.


Potato battery update + potatronic brain

About the PR

This PR overhauls the potato battery:

Makes it actually craftable.
New sprite that is an actual potato
Capacity heavily nerfed
Can't fit in chargers (How would that even work?)

Along with the potato battery, there are the supercompact AI chip and the potatronic brain, a greener alternative to the positronic brain, useful for when salvage is dead in a ditch and not bringing in silver. Definitely not an elaborate reference.
Why / Balance

Potato battery:

The sprite was ancient and quite literally didn't match up with anything else currently in the game.
It was kind of weird that an item that is a makeshift battery isn't actually craftable, and was only available on a couple maps where it was mapped. (Given how ugly it was that might've been a good thing)
Emo agreed that it should be craftable (https://discord.com/channels/310555209753690112/346743671787356160/1164302079716769812)

Potatronic brain:

It's funny
Gives an actual use to the potato battery (since it's way worse than even a small power cell)
Acts as an alternative to the posibrain, overall less material cost but takes more time to make
Relies on botany instead of salv, so it's a good backup plan if salv isn't bringing in silver

Technical details

In terms of code, only added a blacklist to ItemSlotsComponent to be able to prevent the potato battery from being inserted into regular rechargers.
Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
:cl:

add: Potato batteries can be built by crew.
add: New compact AI chips may be powered via potato batteries.

not really a fan of  being able to use potatoes to bypass the cost of making positronic brains. There's obviously more of a time investment but there's a vast difference in the material cost that I don't think is made up for.

Would you rather increase the material cost of the potato or change its function from posibrain to pAI?

Would you rather increase the material cost of the potato or change its function from posibrain to pAI?

probably would rather just make it a flavored PAI, tbh.

Yeah I was thinking about that, though in that case I'd like to move the chip out of the lathe so it's entirely hand-craftable, any issues with that?

Would you rather increase the material cost of the potato or change its function from posibrain to pAI?

probably would rather just make it a flavored PAI, tbh.

ah, so that's what the P stands for

Yeah I was thinking about that, though in that case I'd like to move the chip out of the lathe so it's entirely hand-craftable, any issues with that?

yeah that's fine.

Alright I'll reorganize it all in like half an hour

Done, this was one of the two implementations I had in mind anyway, and the 'pAI = potato AI' pun is funnier tbh

not really a fan of being able to use potatoes to bypass the cost of making positronic brains. There's obviously more of a time investment but there's a vast difference in the material cost that I don't think is made up for.

if you could put these in borgs it would be really funny

Yeah but uhhhh balance

if only people were better.. also how do yuo even make the potato (ai) chip?

Just craft it with 1 steel, 1 glass, 2 wires and 2 capacitors, no dont ask how you can put that together by hand

PotatOS my beloved


[bug] sfpeg-list-cmp - Regression UI from spring release

Describe the bug
Since spring release we observed different size button in the sfpeg list header actions, particularly with drop down list button.
To Reproduce
Steps to reproduce the behavior:

Configure a sfpeg list component on a lightning page with sorting capabilities for example
Go to the lightning page and observe the issue

Investigations
After talking with Salesforce support, here is the final conclusion:
Root Cause Analysis of the issue :-
As mentioned previously this is occurring because of the component size properties, the size is affected due to the LWC component rendering on the property called "border-filled".
There is no offical proof that the css behind changed with the release..
So we detect in the following components the variant="border-filled" used
c-sfpeg-action-bar-cmp
c-sfpeg-list-cmp
Screenshots of the issue

@alexispissinier Issue fixed ! Thanks for the hint.


Issue getting device password

im trying to use the library as standalone to get the required tokens to use to integrate with my own automation
the problem im having is if i use the api example with 2FA and enter the code i correctly get the tokens back but the device is not registered as a trusted device so i never see the device password to be able to use the refresh api.
i am new to this aspect and using python but not new to coding in general
hoping someone might be able to help me

Seconded - I just hit this as well.  It took me a while to get to that stage as the examples documentation seems a bit out of date (lots of things like deviceLogin instead of device_login ...I might fork and correct those bits of the docs if I get time).  I've been picking through the code but can't quite follow how the device-registration is supposed to work with the API.


Use the trust namespace as the namespace where the role and rolebinding are created in

Fixes #16
/assign @SgtCoDFish

/test pull-cert-manager-trust-verify

/test pull-cert-manager-trust-verify

/test pull-cert-manager-trust-verify


Add --classic-tcp parameter to replicate hddtemp TCP socket output

Adds classic-tcp parameter which outputs in the format of the hddtemp daemon that the legacy tool offered.
It can fully replace the previous setup using a systemd socket:
/etc/systemd/system/hddtemp.socket:
[Unit]
Description=hddtemp-lt Socket

[Socket]
ListenStream=[::]:7634
Accept=yes
IPAddressDeny=any
IPAddressAllow=<IP_ADDRESS>

[Install]
WantedBy=sockets.target

<EMAIL_ADDRESS>[Unit]
Description=hddtemp-lt Service
Requires=hddtemp.socket

[Service]
Type=simple
ExecStart=/opt/hddtemp/hddtemp-lt --classic-tcp
StandardInput=socket
StandardError=journal
TimeoutStopSec=5

[Install]
WantedBy=multi-user.target

Thanks for the PR, I'm looking into it.

I didn't immediately know of a more elegant way of removing the colon in the output without the special casing on Line 290, feel free to make that better if you can!
Adding the : in the output section made more sense to me instead of choosing it when filling the array, but I couldn't figure out how to do that with the padding on L298.

Adding the : in the output section made more sense to me instead of choosing it when filling the array, but I couldn't figure out how to do that with the padding on L298.

Putting the colon there was a bad idea of mine. What I didnt like about the original tool, is the non-aligned output. I made it aligned into columns by default, but when the device names differ in length, it doesn look nice:
> sudo ./hddtemp-lt /dev/{a,ab,abc,abcd,abcde,abcdef} | shuf
/dev/ab:      ?  ?
/dev/abcdef:  ?  ?
/dev/abcde:   ?  ?
/dev/abc:     ?  ?
/dev/abcd:    ?  ?
/dev/a:       ?  ?

I gonna rid of the colon in the default mode.


add theme spaced-blog

sorry for re-opening a few times but i am just trying to get the deploy preciew puurrrr-fect for you! if there is a better way then please let me know!


Data set

Whether the data set is available for further research. Other wise could you please tell how to collect the data sets.

You can check out the paper on arxiv for information on how they collected and labeled the dataset.  Basically, they used VirusTotal. FYI, it's only for non-commercial use and you need to contact them if you want to query more than 4 instances per minute.


No error assigning {} to object type with required properties

Flow version: master, v0.92.1
https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoALgTwA4FMwAaYAvGAN5gCGAXGAM7oBOAlgHYDmYAvgNyoy50YOACMAVrSKkyvfoPpNaDFhxLDxAOko8gA
/* @flow */
type X = { a: string };
let obj: X = {};
let str: string = obj.a;

Expected behavior
Behaves as expected in Flow v0.88.0:
3: let obj: X = {};
                ^ Cannot assign object literal to `obj` because property `a` is missing in object literal [1] but exists in `X` [2].
References:
3: let obj: X = {};
                ^ [1]
3: let obj: X = {};
            ^ [2]

Actual behavior
No error in Flow v0.89.0 and newer.

This is intentional. The empty object {} is treated as unsealed. If you want to prevent this behavior, mark X as exact as so:
type X = {| a: string |};
let obj: X = {};
let str: string = obj.a;

Still, within a declaration-with-initializer statement, Flow should be able to know that it doesn’t satisfy the requirements of the destination type, right?

This is an unfortunately side-effect of the way that unsealed objects behave. If you want to avoid this behavior, I strongly recommend not using them, and making all your object types exact in order to get the guarantees that you want.

That makes sense, but even if it's intentional that {} is treated as unsealed, I would still consider this a pretty dangerous behavior. Here's another example: https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoALgTwA4FMwAaYAvGAN5gCGAXGAM7oBOAlgHYDmYAvgNyqpQArqwDG6ZnFZh2udAEEAFHABGAK1oEAlOVRgwjWYMZSVqgHSU+XfjFn0mtBiw4lpsxWS6a+QA
type X = { a: string };
function getA(obj: X) {
  return obj.a;  // looks good, any object of type X should have the .a property
}

// elsewhere...
let str: string = getA({});  // no error

The recommendation to use exact object types makes sense, and I generally try do to that, but this behavior seems to show that someone using a non-exact type can't even rely on the properties they expected being present at all 😕
I noticed the docs about unsealed objects mention:

reads from unsealed objects with no matching writes are never checked. This is an unsafe behavior of Flow which may be improved in the future.

So is this bug a duplicate of an existing bug, or is there a ticket tracking this somewhere that I can follow?

It's certainly unsafe, but it is sound up to undefined. Most languages only make this guarantee; consider array accesses as an example. Most languages don't require you to bounds check all of your accesses manually, they just assume that you are accessing a value that is actually present in the array. This is the same principle. We have been debating what to do about unsealed objects, but have yet to reach consensus on the right way to pre

Can you explain more about what you mean by soundness “up to undefined”? Is it to say that any value in the program might have a value of the type it claims to be, or it might be undefined? I’m not very familiar with the precise guarantees Flow is trying to make, but it seems like preventing proliferation of undefined where it’s not expected is one of the major features the type system provides...

Well in a gradually typed language like Flow (or Typescript or Hack) any type might have the type it claims to be, or it might have any other type, because of the existence of any. Consider:
var x : string = "hello"
var y : any = 4;
x = y;

But if we put that aside for the moment, the semantics of Javascript make it very difficult to type object/array accesses in a way that is both sound and easy to use. The sound way to type class, object or array access is to have the access return a union of T and undefined, but this would require programmers to explicitly check all of their accesses and we (along with most other languages) made a usability decision not to require this. If it is important to you that your object accesses not return undefined, the solution is to use exact types. Similarly, if you need to be sure that an array access is not undefined, you can check it explicitly or use a tuple type which has a known size.

Thanks for the detailed explanation.
I still think there is a UX bug here. Sorry for my imprecise language but I'll try to explain: even though {} is treated as unsealed, I think the unsealed-ness should only extend as far as types are still being inferred. In my example with function getA(obj: X), getA({}) should be an error because the unsealed object was not modified/accessed at all before it was passed to a parameter of a specific/sealed type. (Note that getA(({}: {})) is in fact an error.)

Why was this significant change not mentioned in the changelog? This leads to a lot of surprising changes in behavior.


Memory leak?

I've just installed this extension, and immediately the memory usage of VSCode went through the roof.
The extension does not work at all.
It might be related to the insiders build of VSCode.
Version 1.21.0-insider
Commit efa33330fb0ab23b022bdff125311bdb21494b71
Date 2018-02-21T09:22:14.399Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Hmm, interesting. Had you opened an eml file to trigger the syntax highlighting or was that purely after installing the extension?
I'm on 1.20.1 but I'll check with the insiders build as well.

I opened an eml file, and it went nuts :)

Ah, that's not good. The memory usage on my Insiders build went up a bit, but not through the roof.
I played a bit fast and loose with some of the matchers so I'll amend them to see if I can get it down.

I'll make a small video of what's happening on my side.

Here's a short example (sorry for the awful sharing site, but the tool itself is pretty great :)
https://screenpresso.com/=J6Z5g

Thanks for that video! I've been able to reproduce the exact same problem by using a Windows machine as well (and it crashed the whole machine) so I'll be trying to fix that up ASAP.

An interim release has been published while I fix the issue (0.1.4).

This should now be fixed in a82f0d1 and version 0.2.1 has been published with the fix.
tl;dr: I accidentally added an extra regex op in development but didn't notice because it didn't impact macOS computers (but have fixed for everything now)
Thanks for letting me know! ✨

Interesting that it didn't affect macOS... :) But thanks for fixing it... :)


Missing a couple of glsl options?

Hey, first thanks for an awesome package. This project is a lifesaver to all (like me) who didn't delve into GPU rendering.
I do have a question tho, in the Anime4K repo there are more options of shaders, like CNN_{S, L}, Denoise_CNN_{S, M, L, UL}.
I just wonder, is there a specific reason as to not include all the shader varients? Is it hard to add the remaining ones?

Thanks for your interest! Yes the original Anime4K repo covers more shader options than this repo, and the reason lies in the semi-automated way we currently use to convert those shaders into webGPU pipelines.
Right now, each mpv glsl shader can be converted into multiple wgsl shaders with this script. However, since webGPU, like Vulkan, is low-level, we need to manually write pipelines that chain the wgsl shaders, like this pipeline. These pipelines are easy to write once you understand one of them since they just represent the compute graph of the NNs in glsl.
Also, only a handful of shaders are used in the most popular preset modes defined in the original repo, and they were all made available here in hope that the needs of most users could be satisfied. We are currently out of time and people to cover every shader in the Anime4K repo, but will add more in the future :)


Zephyr devicetree API

ubxlib is not integrated with the devicetree model, this is confusing and limiting.
Devicetree wants you to to have a device(on a bus) and load the driver based on the compatible string, while ubxlib wants you to setup the bus in the devicetree, put no device on it, and use preprocessor defines to select what bus to use.
Aside from being confusing, this makes supporting two boards that have different u-blox chips on different busses very difficult.
For other things like status lights, I just configure the devicetree so that the LED named "gnss_fix" is on an IO expander on board A, on IO on board B, and the codebase doesn't need to know how it's connected.
But for ubxlib, I have to additionally set some preprocessor flags to select the ublox bus and chip type in addition to telling zephyr which board devicetree to use.

The devicetree configuration stuff is available at compile time, so I suspect that a zephyr driver could handle converting the devicetree configs into the defines ubxlib is expecting.
There would definitely be issues if someone tries to have two ublox modules connected, and probably some other edge cases because drivers are supposed to be self contained and pass around a pointer to a struct for all of the configuration (example)
I'll try to look into this more, but I'm doing this for a $work project that I'm being moved off of, so I can't promise much.

I made a very first pass dts shim that seems to work for my usecase.
dts/bindings/sensor/ublox,ubxlib-shim.yaml:
description: |
  A shim to put ubxlib in the devicetree

compatible: "ublox,ubxlib-shim"

include: base.yaml

properties:
  bus-type:
    type: int
    enum:
      - 0
      - 1
    required: true
    description: type of bus it's on, 0=spi, 1=i2c
  bus-num:
    type: int
    required: true
    description: what number bus it's on (4 for spi4, for example)
  module-type:
    type: int
    enum:
      - 0
      - 1
      - 2
    required: true
    description: What type of ublox module, M8=0, M9=1, M10=2

devicetree overlay:
&spi4 {
    compatible = "nordic,nrf-spim";
    status = "okay";
    cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
    pinctrl-0 = <&spi4_default>;
    pinctrl-1 = <&spi4_sleep>;
    pinctrl-names = "default", "sleep";
    ublox: ublox@0 {
        compatible = "ublox,ubxlib-shim";
        reg = <0>;
        bus-num = <4>;
        bus-type = <0>; // 0 is spi, 1 is i2c
        module-type = <1>; // 0 is M8, 1 is M9, 2 is M10
    };
};

main.c:
#define UBLOX DT_NODELABEL(ublox)
#ifdef UBLOX
    #if DT_PROP(UBLOX, bus_type) == 0 // spi
        #pragma message ( "spi" )
        #define U_CFG_APP_GNSS_SPI DT_PROP(UBLOX, bus_num)
    #elif DT_PROP(UBLOX, bus_type) == 1 // i2c
        #pragma message ( "i2c" )
        #define U_CFG_APP_GNSS_I2C DT_PROP(UBLOX, bus_num)
    #else
        #warning "bad ublox dts config"
    #endif
    #define U_CFG_TEST_GNSS_MODULE_TYPE DT_PROP(UBLOX, module_type)
#else
    #warning "no ublox in dts?"
#endif
...
static const uDeviceCfg_t gDeviceCfg = {
    .deviceType = U_DEVICE_TYPE_GNSS,
    .deviceCfg = {
        .cfgGnss = {
            .moduleType = U_CFG_TEST_GNSS_MODULE_TYPE,
            .pinEnablePower = -1,
            .pinDataReady = -1, // Not used
        },
    },
#if defined(U_CFG_APP_GNSS_I2C) &&  (U_CFG_APP_GNSS_I2C >= 0)
    .transportType = U_DEVICE_TRANSPORT_TYPE_I2C,
    .transportCfg = {
        .cfgI2c = {
            .i2c = U_CFG_APP_GNSS_I2C,
            .alreadyOpen = true
        },
    },
#endif
#if defined(U_CFG_APP_GNSS_SPI) &&  (U_CFG_APP_GNSS_SPI >= 0)
    .transportType = U_DEVICE_TRANSPORT_TYPE_SPI,
    .transportCfg = {
        .cfgSpi = {
            .spi = U_CFG_APP_GNSS_SPI,
            .pinMosi = -1,
            .pinMiso = -1,
            .pinClk = -1,
            .device = U_COMMON_SPI_CONTROLLER_DEVICE_INDEX_DEFAULTS(0)
        },
    },
#  endif
};

I had spent a while trying to figure out how to get "4" out of the spi4 devicetree defines so you don't have to configure it into the shim, and I came to the conclusion you can't.
And without doing string comparison on the "compatible" of the spi/i2c bus you can't figure out if it's spi/i2c, and the preprocessor doesn't want to do string comparisons.
It needs some extending to support things besides i2c and spi, and extended to support other configs like alternate i2c addresses, but I think this is our best approach for the short term.
This meets my needs, so while I'll definitely post if I come up with something better I'm probably just going to use this.

That's really interesting: I'm on holiday for a week now but will take a look at it when back.
A question though: we're adding Linux support right now, should be in for the end of July release, and for that we've had to add a "prefix" API (pasted in below) to accommodate the string needed to get at a given UART device. We will likely have to do a similar thing for I2C (Raspberry Pi being our main use-case).  Are there additions like this, i.e. APIs added to ubxlib in a backwards-compatible way, that could make accommodating a device-tree-driven approach more "complete"?
/** Set the uart name prefix to be used in the next call to
 * uPortUartOpen().
 *
 * On some platforms this name will prefix the uart parameter
 * passed to uPortUartOpen(); for example a prefix of "/dev/tty"
 * with a uart value of 3 will result in device "/dev/tty3"
 * being opened as a UART.  If the uart parameter passed to
 * uPortUartOpen() is < 0 then only the prefix will be used
 * (e.g. "/dev/tty").
 *
 * This is currently only applicable for the Linux port.
 * The default prefix if this function is not called will be
 * #U_PORT_UART_PREFIX.
 *
 * @param[in] pPrefix  a pointer to a string containing the name
 *                     prefix, up to #U_PORT_UART_MAX_PREFIX_LENGTH
 *                     characters long.
 * @return             zero on success else negative error code.
 */
int32_t uPortUartPrefix(const char *pPrefix);

Stop checking your email on holiday :)
Right now with my bodge version of a devicetree config method, it would be nice if I could just pass ubxlib the struct* gpio_dt_spec for the bus instead of passing a number, just for ubxlib do get the struct* gpio_dt_spec with GPIO_DT_SPEC_GET_BY_IDX in getSpiCsControl or wherever.
I'm just not sure if that would be a helpful step towards the final goal of being able to configure ubxlib by devicetree and not involving uDeviceCfg_t, or if it would just have to get removed later.
We should first figure out what having an actual devicetree driver looks like and then decide how to get there.
My intuition says that doing it all at once would be better then as steps, but I have not yet done a devicetree driver and therefore don't really know.

While performing some domestic duties (I am on holiday but am at home), a thought occurred to me: we could introduce a new uDeviceTransportType_t, called something like U_DEVICE_TRANSPORT_TYPE_PRECONFIGURED.  The idea would be to support cases where the configuration of the device is done "out of band" by the SDK, accommodating the Zephyr and Linux approaches.  The struct to go with it might look something like this:
/** Preconfigured transport, supported only by the likes of Zephyr and Linux.
*/
typedef struct {
   uDeviceVersion_t version;       /**< Version of this structure; allow your
                                        compiler to initialise this to zero
                                        unless otherwise specified below. */
   uDeviceTransportType_t type;    /**< The type of the transport that has been
                                        preconfigured: UART, I2C, SPI etc.; must
                                        NOT be set to
                                        #U_DEVICE_TRANSPORT_TYPE_PRECONFIGURED. */
   const char *pName;              /**< A pointer to the null-terminated name of the
                                        transport, which must have meaning to,
                                        must have been already configured by, the
                                        underlying platform (for example
                                        uart0 or /dev/ttyUSB0); cannot be NULL. */
   /* This is the end of version 0 of this structure:
      should any fields be added to this structure in
      future they must be added AFTER this point and
      instructions must be given against each one
      as to how to set the version field if any of
      the new fields are populated. For example,
      if int32_t pinMagic were added, the comment
      against it might end with the clause "; if this
      field is populated then the version field of
      this structure must be set to 1 or higher". */
} uDeviceCfgPreconfigured_t;

Note: for the SPI case this assumes that the peer device configuration (bit-ordering, clock edge, etc.) can also implied by the same single pName; if not then we may need to add a const char *pSpiDeviceName and maybe an int32_t spiDeviceIndex; this needs checking.
Then in each of the uPortUart, uPortI2c and uPortSpi APIs we add a uPortXxxOpenPreconfigured(const char *pName) function which can be used instead of the existing uPortXxxOpen() functions.
The effective change is to pass the name in from the top, from the uDevice API, rather than trying to put the bits of it together later from the int32_t and a prefix etc.  This new mechanism could then be supported by Linux and Zephyr, and the big win from it could be that, via this API, the Zephyr port layer might actually be generic, the UART of an Atmel chip would work, 'cos all the naming differences in the device tree are irrelevant to us... I hope?  We would still support the "old way" for existing chipsets, but those using Zephyr and Linux get the choice of a much easier to use API that properly supports any chipset.
@mtfurlan: would this help?

@mtfurlan @RobMeades what is the timeline on this we have a similar issue using Zephyr 3.4 but for UART.

I don't think  uDeviceTransportType_t type and const char *pName changes anything, we would still needs to know what bus type and what bus "name" we're on at compile time.
Just instead of passing a bus number we would have a string we need to parse before putting it into that switch to find the gpio_dt_spec.
With zephyr I want to pass in a struct *gpio_dt_spec, and we can figure out at runtime what type of device it is.
But that isn't what linux needs at all.
Now I'm on holiday, so while I can't actually play around with anything and I don't have dedicated time, I'll keep thinking about this.

@bjarki-trackunit might have some good input as well!

For backgound, since a few people are hooked into this now, ubxlib has a structure which defines a u-blox device (what kind (cellular, wifi, BLE, GNSS) and the specific type (M8 v M9 v SARA-R5 v NINA-W15 etc.)) and the details of the transport the MCU is using to connect to that device (all of the varied aspects of UART, SPI or I2C).
https://github.com/u-blox/ubxlib/blob/efdc592cb2aa840900e1c6591d00124f41eb8867/common/device/api/u_device.h#L325
The elements of these structures are integers (enumerated types, integer pin numbers, integer HW block numbers) and are passed into the ubxlib port layer at run-time as integers.
This was all fine and good until Zephyr landed with the string-based device tree.
mtfurlan has very sensibly suggested that ubxlib might look at a way to accommodate Zephyr users with a specific API that allows not only the transport stuff to be taken directly from the device tree but also the ubxlib-specific device stuff (module kind and type) to be brought in in the same way, a way that is natural for Zephyr users.  I'd kinda hoped that the same approach might also apply for Linux, which we are just adding support for, given the device tree commonality, but maybe that's a hope too far.
Anyway, that's the aim: invent a "device-tree sympathetic" addition to the transport portions, and maybe the GPIO portion, of the ubxlib port layer API, somehow tunneled through the ubxlib uDevice layer API.

Hi, regarding the devicetree, bus attached devices and gpio descriptions are supported by the devicetree without adding any new property or definitions.
Bus attached devices
I2C and SPI attached devices are "natively" supported. They import the bindings from i2c-device.yaml and spi-device.yaml. For an example from the devicetree of a device placed on a SPI bus, see b_l4s5i_iot01a dts(lines 144 to 169). For an example of determining and adjusting the the used bus type, see bmi323 driver(note macros like DT_INST_ON_BUS(inst, spi))
ubxlib and Zephyr device drivers
Zephyr does not support dynamically loading device drivers and modules. When Zephyr builds a board, it is known exactly what actual hardware is connected to which bus. The devicetree "compatible" property contains the exact hardware module placed on the board (M8, M9, M10), device drivers can support multiple hardware modules and revisions. Each specific modem has an associated bindings file, which defines exactly what hardware (pins and properties etc) are available to that specific modem.
Example of ublox modem dts
&spi3 {
	pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>;
	pinctrl-names = "default";
	status = "okay";

	cs-gpios = <&gpiod 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
		   <&gpioe 0 GPIO_ACTIVE_LOW>;

	gnss@0 {
		compatible = "ublox,neo-m9n";
		reg = <0>;
		power-enable-gpios = <&gpioa 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
		spi-max-frequency = <2000000>;
	};
};

Example of ublox modem bindings file
Only add exactly the pins and busses this particular hardware revision supports:
compatible: "ublox,neo-m9n"

include: ["spi-device.yaml", "i2c-device.yaml"]

properties:
  power-enable-gpios:
    type: phandle-array
    description: |
      Power enable gpio

Example device driver
This shows the end of a device driver supporting multiple hardware revisions.
...
...
...

#define UBLOX_NEO_M9N_DEVICE(inst)
...

#define UBLOX_NEO_M10_DEVICE(inst)
...

#define DT_DRV_COMPAT ublox_neo_m9n
DT_INST_FOREACH_STATUS_OKAY(UBLOX_NEO_M9N_DEVICE)
#undef DT_DRV_COMPAT

#define DT_DRV_COMPAT ublox_neo_m10
DT_INST_FOREACH_STATUS_OKAY(UBLOX_NEO_M10_DEVICE)
#undef DT_DRV_COMPAT

To summarize:

Create bindings files for every distinct hardware model (different footprints etc are irrelevant)
Create one or more device drivers which maps devicetree info to ubxlib
No changes to devicetree and macros are needed.

Lastly, to expose ubxlib features to the user, there is no generic API in Zephyr, create bespoke APIs for ubxlib in include/drivers/modem/<your_modem_specific_header_here.hpp> to expose driver specific features. There are already examples in that folder to use.

Thanks for the comprehensive input @bjarki-trackunit: we will think on't and allow mtfurlan to comment when he returns from holidays.

The steps @bjarki-trackunit outlined look like the way to implement this actually correctly.
I only posted my stopgap solution above so we have something until we get a full and proper devicetree implementation.
Also I don't know much about the device driver side or the ubxlib interface side.
The next step is to make a device driver and see what new interfaces/interface changes we need in ubxlib.
I got moved to a different project at work so if someone else can take over that would be nice, otherwise I'll try to carve out an hour or two a week for this.

@mtfurlan: understood.  The members of the ubxlib team who know more about the Zephyr device tree are from our Swedish office, which has entered the Swedish holiday season now, so not a great deal is going to happen on this front for at least the next three weeks.
Your suggestions, coming at it from a Zephyr angle, would be greatly valued, if you are able to find the time in the interim.

How much of this issue has overlap with https://github.com/u-blox/ubxlib/commit/336e6acc90fed8b9824f85198cecdcf9311eba69 and other more recent commits that I have not had the time yet to dig into?

@bperseghett: https://github.com/u-blox/ubxlib/commit/336e6acc90fed8b9824f85198cecdcf9311eba69 is a step in the right direction, in that it resolves the problem of Zephyr platforms that don't follow the naming convention that ubxlib expects in the device tree for UART/I2C/SPI.
What we have not yet done is added support for custom tags that would allow ubxlib-specifics, such as the module type, to be passed in directly from the device tree.

@bjarki-trackunit: I'm getting to grips with the DT macros etc. to implement this but am getting an error with the reg property; can you point me at what I might do to fix/debug this?
Though I don't need it I understand that the property is required so I have used 0 for it as you suggested above:
&uart0 {
    compatible = "nordic,nrf-uarte";
    status = "okay";
    current-speed = <115200>;
    pinctrl-0 = <&uart0_default>;
    pinctrl-1 = <&uart0_sleep>;
    pinctrl-names = "default", "sleep";
    // My bit with @0 and reg = <0>
    cfg-device-cellular@0 {
        compatible = "u-blox,ubxlib-device-cellular";
        reg = <0>;
    };
};

...however the Device Tree parser throws this error:
devicetree error: 'reg' property in <Node /soc/uart@40002000/cfg-device-cellular@0 in '/nrfconnectsdk-v2.5.0/zephyr/misc/empty_file.c'> has length 4, which is not evenly divisible by 12 (= 4*(<#address-cells> (= 2) + <#size-cells> (= 1))). Note that #*-cells properties come either from the parent node or from the controller (in the case of 'interrupts').

sure, child devices of uarts don't have addresses (the @0 and regs =<0>) unlike I2C and SPI bus devices

Oh!  OK, now I know I suppose.  Thanks for the remarkably swift response.

@mtfurlan, @bperseghetti, @bjarki-trackunit: as my Christmas project I have been trying to, finally, get this done.
I have something which works but there is a "however": for nodes such as &uart0, &spi0, &i2c0 and also for gpios phandles, there is no way, through Zephyr DT macros, to obtain the peripheral type and the HW block number, e.g. to get the uart and the 0, or even the "uart0" as a string.
These two things are fundamental to the way ubxlib works.
Hence I've had to do things the other way up, i.e. to have ubxlib device nodes which, within them, have ubxlib-style configuration properties for the peripherals, following the pattern of the ubxlib device configuration structures for UART, SPI and I2C and using plain-old pin numbers.  I've included an example .dts file below containing all possible DTS properties (the one I am testing with), where the i2c and spi nodes show this most clearly.
This is not ideal: it means that some of the "nativeness" of this approach is lost.  I guess I could make the property names in my bindings file match those used by most existing Zephry I2C/SPI/UART peripherals, but that seems a bit of a hack, and might be confusing if not all existing Zephyr peripherals turn out to use the same properties anyway.
Your thoughts on this would be appreciated.
    cfg-device-cellular-0 {
        compatible = "u-blox,ubxlib-device-cellular";
        status = "okay";
        transport = "uart0";
        baud-rate = <57600>;
        module-type = "U_CELL_MODULE_TYPE_SARA_R422";
        pin-enable-power = <0>;
        pin-pwr-on = <10>;
        pin-vint = <35>;
        pin-dtr-power-saving = <36>;
        network = <&label_cfg_network_cellular_thingy &label_cfg_network_gnss_inside>;
    };
    cfg-device-cellular-1 {
        compatible = "u-blox,ubxlib-device-cellular";
        status = "okay";
        transport = "uart3";
        network = <&label_cfg_network_cellular_thingy &label_cfg_network_gnss_inside>;
    };
    cfg-device-cellular-2 {
        compatible = "u-blox,ubxlib-device-cellular";
        status = "okay";
        transport = "uart2";
    };
    cfg-device-gnss-0 {
        compatible = "u-blox,ubxlib-device-gnss";
        status = "okay";
        transport = "i2c0";
        i2c-clock-hertz = <1000>;
        i2c-already-open;
        i2c-address = <43>;
        module-type = "U_GNSS_MODULE_TYPE_M9";
        pin-enable-power = <1>;
        pin-data-ready = <36>;
    };
    cfg-device-gnss-1 {
        compatible = "u-blox,ubxlib-device-gnss";
        status = "okay";
        transport = "spi2";
        spi-frequency-hertz = <2000000>;
        spi-index-select = <0>;
        spi-mode = <2>;
        spi-word-size-bytes = <3>;
        spi-lsb-first;
        spi-start-offset-nanoseconds = <5>;
        spi-stop-offset-nanoseconds = <10>;
        module-type = "U_GNSS_MODULE_TYPE_M8";
        pin-enable-power = <2>;
        pin-data-ready = <37>;
    };
    cfg-device-gnss-2 {
        compatible = "u-blox,ubxlib-device-gnss";
        status = "okay";
        transport = "uart4";
        baud-rate = <230400>;
        gnss-uart2;
    };
    cfg-device-short-range-0 {
        compatible = "u-blox,ubxlib-device-short-range";
        status = "okay";
        transport = "uart1";
        baud-rate = <115299>;
        module-type = "U_SHORT_RANGE_MODULE_TYPE_NINA_W15";
        open-cpu;
        network = <&label_cfg_network_ble_peripheral &label_cfg_network_wifi_client_home>;
    };
    cfg-device-short-range-1 {
        compatible = "u-blox,ubxlib-device-short-range";
        status = "okay";
        transport = "uart2";
        network = <&label_cfg_network_ble_peripheral &label_cfg_network_wifi_client_home>;
    };
    cfg-device-short-range-2 {
        compatible = "u-blox,ubxlib-device-short-range";
        status = "okay";
        transport = "uart2";
    };
    label_cfg_network_cellular_thingy: cfg-network-cellular-thingy {
        compatible = "u-blox,ubxlib-network-cellular";
        apn = "blah";
        timeout = <30>;
        username = "fred";
        password = "blogs";
        authentication-mode = <1>;
    };
    label_cfg_network_gnss_inside: cfg-network-gnss-inside {
        compatible = "u-blox,ubxlib-network-gnss";
        module-type = "U_GNSS_MODULE_TYPE_M10";
        device-pin-pwr = <9>;
        device-pin-data-ready = <32>;
    };
    label_cfg_network_wifi_client_home: cfg_network_wifi_client_home {
        compatible = "u-blox,ubxlib-network-wifi";
        ssid = "my_home_ssid";
        authentication = <2>;
        pass-phrase = "my_pass_phrase";
        host-name = "my_host_name";
        mode = "STA_AP";
        ap-ssid = "my_home_ap_ssid";
        ap-authentication = <6>;
        ap-pass-phrase = "my_ap_pass_phrase";
        ap-ip-address = "<IP_ADDRESS>";
    };
    label_cfg_network_ble_peripheral: cfg-network-ble-peripheral {
        compatible = "u-blox,ubxlib-network-ble";
        role = "PERIPHERAL";
        enable-sps-server;
    };

I have now tidied this up and pushed a preview branch here with a better explanation of how it is intended to be used.

I'm sorry, but this is not compatible with the Zephyr project. The device driver model is not just a convenience, its one of the most essential pillars the project rests upon.
Drivers added to the project must adhere to the device driver model. That is, implement and adhere to the existing devicetree bindings and device driver APIs.
The following is an example of how a modem looks in the devicetree:
/* This is the uart node,  transport = "uart2"; will not be accepted */
&usart1 {
	current-speed = <115200>;
	hw-flow-control;
	pinctrl-0 = <&usart1_default>;
	pinctrl-names = "default";
	status = "okay";

	modem: modem {
		power-domain = <&pd_modem>;
		compatible = "quectel,bg95";
               /* This is a GPIO pin,  device-pin-data-ready = <32>; will not be accepted */
		mdm-power-gpios = <&piob 14 GPIO_ACTIVE_LOW>;
		zephyr,pm-device-runtime-auto;
		status = "okay";
	};
};

This is what your library must adhere to. Adding properties like transport = "uart2"; and device-pin-data-ready = <32>; will not be accepted into the project :(
I would suggest you research the following:

Device driver model
GNSS device driver API
This may bring some light to the issue :)

Hi @bjarki-trackunit and thanks for the comment on Christmas eve eve!
The problem is that, unfortunately I can't see any way to adopt what you suggest.  Not only have my researches of the last week not turned up any way to do that but  mbolivar, who I guess is an authority on this from his presentation at the Zephyr development conference [said]:(https://discord.com/channels/720317445772017664/733037557218279515/1187107267909259264):

not right now, no. the token blah is not the node's name, it is a node label. you cannot get the node labels for a node right now.

...in answer to my query:

Given a node:
&blah {
...
};
...and something which refers to that node:
thingy = &blah;
...is there a DT macro that I can apply to thingy which will get me the name "blah"?  In other words, not all of the stuff that blah refers to, with registers and the like, just its name?

Of course, I've no particular need for any of this to be accepted into Zephyr, that is not the intention, the intention is just to provide a "Zephyr sympathetic" mechanism for Zephyr users to provide the configuration that ubxlib needs.  But it would be nice to do it the canonical way: there just doesn't seem to be one.

The primary issue seems to be the ubloxlib including its own HAL, defining its own uart drivers and hardware layout language.
Trying to repurpose the devicetree to match a HAL that is not founded in the devicetree is not feasible. The devicetree includes many rules that are well defined in the devicetree specification v0.4.
You will likely find adapting ubloxlib to use the devicetree and Zephyr device driver model to be far more practical, compared to trying to adapt the devicetree and device driver model to fit the library.

You are probably right but that would result in ubxlib having a platform-specific porting layer, which is the antithesis of a porting layer.  And it would only be because, for a given phandle, we are unable to determine what type of peripheral it is pointing to (UART. I2C, SPI or GPIO) and the HW block number of that peripheral, which don't seem like odd things to ask.
Anyway, thanks for your guidance.  It is Christmas Eve so I will let this rest for a while now and see if others comment on the usefulness or not of what is possible.
Have a very good Christmas.

While it would definitely be better if ubxlib could be 100% compatible with devicetree, it looks like what @RobMeades proposed is still more useful than nothing.
At least with that you can define two different board definitions that setup a ubxlib driver for different hardware.
I'll try out that preview branch in the next few days.

@mtfurlan: thanks, your feedback would be appreciated.

Thoughts so far:

The documentation page needs to link to those binding files, I couldn't figure out what the supported options were from the docs as is.
Really needs an example, in the few hours I poked at it I wasn't able to make it run and I'm not sure if that's because I accidentally setup zephyr wrong, it's a wiring issue, I'm using ubxlib wrong, or something else. (test setup is nordic nRF9160dk_nrf9160 with spi3)

I'll keep poking and rule out wiring issues by using other code.

Yes, it all gets insanely complicated very quickly.  Is it best to link the the .overlay file we use for testing:
https://github.com/u-blox/ubxlib/blob/preview_zephyr_dt_rmea/port/platform/zephyr/runner/boards/ubx_evkninab3_nrf52840.overlay
...or to the bindings files:
https://github.com/u-blox/ubxlib/tree/preview_zephyr_dt_rmea/port/platform/zephyr/dts/bindings

It is worth noting that my testing so far has been at a "logical" level, i.e. I have a test which checks that the values from the .overlay/.dts file (the one linked-to above) ends up in the uDeviceCfg_t etc. structures, I haven't actually done an end-to-end test that checks this has the desired effect on the target HW so there could still be a bug there.

@mtfurlan: I'm just testing an end-to-end case myself, I will let you know when I'm sure the full implementation works.

@mtfurlan: I've tested that this works end-to-end for cellular, haven't been able to do GNSS/SPI as I couldn't find a spare GNSS/SPI board but the calls are all the same from the core code and the unit test of picking up all types of configuration items passes so it should work.  The only issue I fixed (new commit pushed) was that the uNetworkInterfaceUp() part of it wouldn't work properly but I don't think you're using that, just uDeviceOpen().

We will be making our 1.4 release in a few week's time; it doesn't seem likely that Zephyr will provide the DT macros we require to adopt the conventional transport-type = &uart0/pwr-on-gpios = <gpio0 10 0> notation, rather than the string/integer-based transport-type = "uart0"/pin-pwr-on = <10> notation, in that time; my inclination is to go ahead with what is possible, as-is, since it is better than nothing.
All opinions/improvements still welcomed.

I was able to get a modified examples/gnss/pos_main.c to run with the new interface, I passed NULL to uDeviceOpen instead of a config.
I agree this is way better than the current state of affairs.

@mtfurlan: glad you got it working, your analysis is much appreciated; we will go with this, deficient as it is.

This is now pushed to master here, see commit https://github.com/u-blox/ubxlib/commit/d86f0c6223909e30a7ec48f87083f6da104d5132: sorry it took so long and isn't quite what you wanted.  I will delete the preview branch and close this issue.


typo from installDebug

Expected Behavior

Current Behavior

permision to permission
Context

Steps to Reproduce

Your Environment

Build scan URL:

Thanks @zusinShinpei would you like to provide a PR?

I cannot find that file Sorry @blindpirate

No worries. Thanks!

Closing this since it's part of the Android plugin.  Their issue tracker is https://source.android.com/source/report-bugs

Closing this since it's part of the Android plugin. Their issue tracker is https://source.android.com/source/report-bugs

it`s gradlew part


How to Use?

I create and adjust my pose,
send to controlnet,
select and activate ControlNet
select openpose for model and preprocessor
enter a prompt and hit generate
the render looks nothing like the pose i created

Do not select anything for the Preprocessor. You've already got your "preprocessed" image that you created with this extension.

Yes, do not select anything for the Preprocessor, but should select openpose for model.


ModelBuilder integration with CLV

This is an initial integration of basic.py with ModelBuilder,
Please let me know if there's something here you find unacceptable, or something that is crucial is missing. It's most likely not the final stage, but the initial one, nevertheless because of number of classes dependent I prefer to have this one shaped in advance, so I don't need to propagate the changes to all child classes

:books: Documentation preview :books:: https://pymc-marketing--298.org.readthedocs.build/en/298/

I just realized I can't add reviewers @twiecki @juanitorduz @ricardoV94

@juanitorduz @twiecki @ColtAllen @ricardoV94
The integration of model_builder and its core functionalities (saving and loading models) is done, the tests are passing.
There is 1 exception, but I highly doubt that it's because of the integration:
TestGammaGammaModel::test_model_convergence result doesn't fit within relative tolerance limit, the individual one passes.
Please review the changes to see if everything is as expected, and please share your thoughts on the subject

TestGammaGammaModel::test_model_convergence result doesn't fit within relative tolerance limit, the individual one passes.

This is probably due to the test dataset not being sufficiently large enough. GammaGammaModel can only be used for frequency >= 1, which will cut down the number of viable observations by at least a third.

We can squash and merge once the tests pass! Great work @michaelraczycki


Spelling error: "to" is spelled as "tor"

Hi,
There is a spelling mistake: "to" is spelled as "tor" in
"Collaborate – Allows end users to see all records and create new records. But they can only edit or delete their own records. An example for when you want to use collaborate is "up votes" in the Ideas the Perspectives app. You want each user of the app to view the up-votes of other users. But they shouldn't be able tor change the votes for any users other than their own."
Thanks & Regards, Akanksha Gupta

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

ID: f3a31b46-1ff1-ca57-eb2f-613fea8e7cbe
Version Independent ID: 9e4785b8-c7f4-46f8-e0e0-43962eec6e8a
Content: Granting permission to tables in Dataverse for Microsoft Teams (contains video) - Power Apps
Content Source: powerapps-docs/teams/dataverse-for-teams-table-permissions.md
Service: powerapps
Sub-service: teams
GitHub Login: @joel-lindstrom
Microsoft Alias: saperlmu

This is fixed now.


[Archive node migration] Run Berkeley Block producer and Archive node after fork on migrated data

We can expand our testing to step further after migration. Prepare new berkeley block producer with archive node on top of migrated data should prove it correctness. Test steps:

Run full migration
Download berkeley deamon and archive node images
Prepare fork config for berkeley deamon:

Genesis timestamp = current timestamp
Fork config example:

"proof": {
  "fork": {
    "previous_state_hash": <the state hash of last block that's being applied in the replayer> // this is the block that prior to the target-epoch-ledgers-state-hash, I think
    "previous_length": <previous blockchain length>
    "genesis_slot": <a slot that's after the end slot of the previous chain, I am not sure whether this has to be compatible with the gensis timestamp or not, what I had in my test is the previous slot + 1>
  }
}

Overall config should looks like below:
{ "genesis": { "genesis_state_timestamp": <timestamp> }
, "proof": ...
, "ledger": ...
}

Start deamon with some funds to make it elligible block producer
Start archive node which will accepts blocks from daemon
Run replayer after while with checkpoints from fork point and verify it passes

out of scope since there is no plan to invest in automation anymore. We experienced that migration process has to many moving parts and automation would be too big burden. We prioritized implementing verifier tool and migration scripts, leaving room for manual test of migration (since even on small batch of data it takes up to one day)


Proof of concept maven.scala

This is an answer to @srowen question: "what on earth is pom.scala?"
It shows polyglot maven is able with a few touches convert and run apache/spark
Compare pom.xml with pom.scala and let me know if you may like it or not.
BEWARE: This is NOT a pull request to spark! This it not even alpha quality. It is not well converted. Not cleaned up. Untouched! There are number of bugs!!!
What works (with maven 3.3.3+):
mvn clean package -DskipTests
and
mvn clean package -DskipTests -Dfoo=2.11.7 -Pscala-2.11 -Dscala.version=2.11.7 -Dscala.binary.version=2.11
Notes:

it is pretty nice scala and that is 99% untouched output from automatic translation
there is a number of small bugs in polyglot maven
a few things would be nice to discuss and document on upstream polyglot maven before is it adviced for adoption

Future:

I hope to find time to fix the small bugs and prototype a few things I believe could be better on the current polyglot maven
nothing upstream for spark or any other project any time soon

Bottom line:

with two man weeks effort polyglot maven will be ready for something as big as spark

Good job @jvanzyl and @huntc! Thanks!

@srowen check this out! This is not upstream pull request. Just an idea.
Take a (very) brief look - less than a minute - on pom.xml vs pom.scala and let me know what you think.
"meh" or "bad"? :)


Extract Markdown services to package?

Not fully sure about this, since Markdown is at the core of HydePHP and very well fits in the 80% use case.

I think I'm going to make a branch/PR experimenting with moving all Markdown services to a single namespace group just to see how it looks.

Wondering which looks prettiest
return $this->__toString();

return (string) $this;

Extracted common code to single namespace in https://github.com/hydephp/develop/pull/594.


graphql-relay mismatched hashes error

What I'm trying to achieve
When installing a new instance of saleor either locally or on Heroku, it fails due to mismatched hashes. It points to graphql-relay as the offending package.
Steps to reproduce the problem

Clone saleor
Install python packages

There is an issue with graphql-relay: https://github.com/graphql-python/graphql-relay-py/issues/23

The issue in graphql-relay is now resolved.


StoredProfileAWSCredentials is obsolete

With the latest version of the SDK, where we use StoredProfileAWSCredentials and StoredProfileFederatedCredentials we get an obsolete warning, e.g. Error	CS0618	'StoredProfileAWSCredentials' is obsolete: 'This class is obsolete and will be removed in a future release. Please use Amazon.Runtime.CredentialManagement.NetSDKCredentialsFile or SharedCredentialsFile.
But the suggested replacements do not implement the base class AWSCredentials so they aren't compatible.  Are there any docs on how to update?
code is as below:
private static AWSCredentials ReadAwsCredentials(StartupParameters parameters)
{
	if (CommandLineParamsHasAwsCreds(parameters))
	{
		return new BasicAWSCredentials(parameters.AwsAccessKey, parameters.AwsSecretKey);
	}

	if (!string.IsNullOrWhiteSpace(parameters.AwsProfile))
	{
                // warning here
		return new StoredProfileAWSCredentials(parameters.AwsProfile);
	}

	// use implicit credentials from config or profile
	FallbackCredentialsFactory.CredentialsGenerators = new List<FallbackCredentialsFactory.CredentialsGenerator>
	{
		() => new AppConfigAWSCredentials(),
                // warning here
		() => new StoredProfileAWSCredentials(),
                // warning here
		() => new StoredProfileFederatedCredentials(),
		() => new EnvironmentVariablesAWSCredentials()
	};

The obsolete message should be better.  I'll work on that.
Here's the relevant doc for using credentials in the SDK:
http://docs-aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-creds.html
In your case here's what I'd suggest:
    private static AWSCredentials GetDefaultAWSCredentialsFromProfile()
    {
        var credentialProfileStoreChain = new CredentialProfileStoreChain();
        AWSCredentials defaultCredentials;
        if (credentialProfileStoreChain.TryGetAWSCredentials("default", out defaultCredentials))
            return defaultCredentials;
        else
            throw new AmazonClientException("Unable to find a default profile in CredentialProfileStoreChain.");
    }

    private static AWSCredentials ReadAwsCredentials(StartupParameters parameters)
    {
        if (CommandLineParamsHasAwsCreds(parameters))
        {
            return new BasicAWSCredentials(parameters.AwsAccessKey, parameters.AwsSecretKey);
        }

        if (!string.IsNullOrWhiteSpace(parameters.AwsProfile))
        {
            var credentialProfileStoreChain = new CredentialProfileStoreChain();
            AWSCredentials credentials;
            if (credentialProfileStoreChain.TryGetAWSCredentials(parameters.AwsProfile, out credentials))
                return credentials;
        }

        // use implicit credentials from config or profile
        FallbackCredentialsFactory.CredentialsGenerators = new List<FallbackCredentialsFactory.CredentialsGenerator>
        {
            () => new AppConfigAWSCredentials(),
            () => GetDefaultAWSCredentialsFromProfile(),
            () => new EnvironmentVariablesAWSCredentials()
        };

Thanks so much! One question - is it correct that GetDefaultAWSCredentialsFromProfile throws if it has nothing? Is that to make the FallbackCredentialsFactory fall back to the next generator in the list?

That's correct.  The exception triggers FallbackCredentialsFactory to move to the next generator.
Glad to help.

@vellozzi  - for some reason this code didn't pick up stored profile credentials,
if (!string.IsNullOrWhiteSpace(parameters.AwsProfile))
        {
            var credentialProfileStoreChain = new CredentialProfileStoreChain();
            AWSCredentials credentials;
            if (credentialProfileStoreChain.TryGetAWSCredentials(parameters.AwsProfile, out credentials))
                return credentials;
        }

(the above code's TryGetAWSCredentials() returned false)
however using the old construct works just fine:
var credentials = new StoredProfileAWSCredentials(profileName);

any suggestions what could be going wrong?

Can you post the content of your credentials file?
Make sure to redact access/secret keys and any other private information.

@vellozzi  - see profile redacted, interestingly there are some extra spaced in some of the profiles, including "default" which I was using
[myprofile1]
aws_access_key_id=********************
aws_secret_access_key=****************************************

[prof]
aws_access_key_id = ********************
aws_secret_access_key = ****************************************

[profxxx]
aws_access_key_id = ********************
aws_secret_access_key = ****************************************

[default]
aws_access_key_id = ********************
aws_secret_access_key = ****************************************

Was there a solution here?  I am still seeing the same problem using the default profile name

No.  I still can't tell from the information given.  Can you open a new issue with your specific code and redacted credentials file?

@vellozzi looks like it was something in my credentials file.  After editing the file to anonymize my keys I could no longer reproduce

@vellozzi figured it out it only occurs for me when I use the default profile. I opened #1041

Can we get a convenience function to load a profile?


Include solutions in solution notes?

Might be useful for some problems to see an elegant solution?

This might be nice if we want to turn https://github.com/project-lovelace/lovelace-solutions into an archive of good solutions in multiple languages (certainly they could be improved by other people), but it might also discourage people from opening their own repos for solutions.


Improved MediaController. Now can set different maxUploadSize for extensions

…ensions

@Exmirai where are the tests to verify the logic you implemented works as expected?


Fixes JsonDocklet for newer Java/Gradle versions

This simply ignores unused options passed in newer Java/Gradle versions.

I built the javadocs with jdk 16 and didn't see any issues.  What is the effect of this PR?

I built the javadocs with jdk 16 and didn't see any issues. What is the effect of this PR?

There should be an error or stack trace somewhere during the build about unrecognized option. At least this was the case back when I made the pull request. I don't remember if it was jdk 13 or 14. If this isn't an issue anymore I don't think it is worth merging.
As a matter of fact I don't have this change locally anymore and haven't seen the stack trace in quite a long time. I'll chalk it up to some version specific jdk issue and close this.


gulp watch - not watching newly created files

When creating a new file gulp.watch won't watch it, even when it matches a path.
Issue with gulp watch https://github.com/gulpjs/gulp/issues/651 and should be fixed with gulp 4

seems to work. Tested with @MathiasTim


When using 'restartFlow: false', need to 'flow check'; not 'flow start'

If I want to keep a flow service running, you provide the restartFlow option to set to false. That is sa-weet! Thank you! However, on my version of flow (0.25.0), the flow command to run a flow check is..., well: flow check. Running flow start on an already started flow (0.25.0 at least) service causes bad things to happen.

Hi @gkedge!
Thanks for reaching out.
Actually, you just found a bug.
In this use case (to not restart flow), we should do nothing, neither flow start or flow check, and here's why:

This function only run once, when the plugin is started
flow start on an already running server throw errors anytime, not only on your version, leading to...
We should do nothing when there's an already running server, because ...
We never used flow check, just flow status, as you can see on the code

Therefore, I think that a valid PR would be more or less like this:
    function startFlow(cb) {
        if (!options.restartFlow === false) {
            shell.exec(flow + ' stop', function() {
                shell.exec(flow + ' start ' + flowArgs, cb);
            });
        }
    }

It would stop and start flow just once, when the user has no other server running. If the user have one, well, we should do nothing, because we have a code (under function flowStatus) that will run later on the pipe and will provide flow output.
What you think?

I will go ahead and create an issue, allowing you to jump in and provide a PR to fix, ok? :)
Thank you @gkedge!

@diegodurli: This have been fixed by #10


give handheld radio its own channel

About the PR
... that is long range
so you dont need to make telecomms for expeditions, it changes handheld radio from mime's trolling device to an actual tool that makes sense in a salvage vendor since they would actually use it
tested and it works with no comms, does not go from station to centcom as expected
currently uses funny radio channel named handheld, idk what else to call it
also ghosts dont see [Handheld] handheld radio says, "whatever" which is nice
also fixes #11713 since it no longer just spews out common (which could be seen as bad for bomb makers that want to activate a bomb using common)
Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
:cl:

tweak: Handheld radios now use their own channel and will work without a telecomms server.

no they wont work without telecomms since they tried to use common
and on expeditions you dont have telecomms to relay common
so no messages are passed

They were designed to bypass telecoms server and just broadcast to common regardless which is why Im confused

they were made before telecomms even existed pro

Yes...?

no comms server to relay common -> handhelds using common dont work
simple as that


Ae dev

made changes to fulfill previous pull request suggestions.

geospace #187 FAILURE
Looks like there's a problem with this pull request

Closing, I am converting Geospace => Lib + Http parts. The changes there will integrate the changes done here.


fixing syntax in describe action

[ ] I have added the tests to cover my changes.
[ ] I have updated the documentation and CHANGELOG accordingly.
[ ] I have read the CONTRIBUTING document.

@AlejandroEsquivel this is the fix needed to get nightly to run properly.  not sure if any of the JS stuff needs to be manually rebuilt.  see #1295 for the same fix in another spot.


Use pdfjs-dist instead of mozilla/pdf.js repo files

Looking at https://github.com/kogmbh/ViewerJS/blob/master/PDFViewerPlugin.js#L45 , the ViewerJS is using some private PDF.js file that are subject to change. It's recommended to use API that PDF.js team publishes at https://github.com/mozilla/pdfjs-dist, and it's somewhat stable.
If you need some other feature, please open an issue at https://github.com/mozilla/pdf.js/

Most of https://github.com/kogmbh/ViewerJS/labels/PDF.js bugs (web/pdf_viewer.js can build/paint a page with text layer and annotations added) and building from source issues will be address (sources are already built) by addressing that.


进入极客模式成功后，开展对话即报错

确认已寻找过答案
我已确认在 Github issue 页、常见问题页、文档 中都查找过，没有找到类似问题和资料。我也没有 google / bing/ 百度 / duckduckgo 到相关解答。
安装方式
手动安装
操作系统
macOS Monterey Version 12.6.5(21G531)
离线唤醒相关
非离线唤醒相关的问题。
我已确保录音、播放都正常工作才尝试 wukong-robot 。
问题描述
进入极客模式后，对其说话会报错，日志如下：
2023-05-04 14:14:00,785 - robot.ASR - ASR.py - transcribe - line 154 - INFO - tencent-asr 语音识别到了：进入极客模式。
2023-05-04 14:14:03,566 - robot.Brain - Brain.py - query - line 71 - INFO - '进入极客模式。' 命中技能 geek
2023-05-04 14:14:03,566 - robot.Conversation - Conversation.py - say - line 398 - INFO - 即将朗读语音：进入极客模式
2023-05-04 14:14:03,567 - robot.Conversation - Conversation.py - _tts - line 305 - INFO - _tts
2023-05-04 14:14:04,583 - robot.TTS - TTS.py - async_get_speech - line 365 - INFO - edge-tts 语音合成成功，合成路径：/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:04,583 - robot.Conversation - Conversation.py - _ttsAction - line 85 - INFO - 第0段TTS合成成功。msg: 进入极客模式
2023-05-04 14:14:04,583 - robot.Conversation - Conversation.py - _ttsAction - line 90 - INFO - 即将播放第0段TTS。msg: 进入极客模式
2023-05-04 14:14:04,584 - robot.Player - Player.py - playLoop - line 101 - INFO - 开始播放音频：/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:07,255 - robot.Player - Player.py - doPlay - line 125 - INFO - 播放完成：/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:07,259 - robot.Conversation - Conversation.py - activeListen - line 418 - INFO - 进入主动聆听...
2023-05-04 14:14:16,849 - robot.ASR - ASR.py - transcribe - line 154 - INFO - tencent-asr 语音识别到了：what's your name？
2023-05-04 14:14:19,992 - robot.AI - AI.py - stream_chat - line 238 - INFO - msg: what's your name
2023-05-04 14:14:19,993 - robot.AI - AI.py - stream_chat - line 247 - INFO - 开始流式请求
2023-05-04 14:14:21,556 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败：Cannot run the event loop while another loop is running
Stack (most recent call last):
File<EMAIL_ADDRESS>line 995, in _bootstrap
self._bootstrap_inner()
File<EMAIL_ADDRESS>line 1038, in _bootstrap_inner
self.run()
File<EMAIL_ADDRESS>line 975, in run
self._target(*self._args, **self._kwargs)
File<EMAIL_ADDRESS>line 607, in run_forever
self._run_once()
File<EMAIL_ADDRESS>line 1922, in _run_once
handle._run()
File<EMAIL_ADDRESS>line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败：{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File<EMAIL_ADDRESS>line 629, in run_until_complete
self._check_running()
File<EMAIL_ADDRESS>line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py:102: RuntimeWarning: coroutine 'EdgeTTS.async_get_speech' was never awaited
return None
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2023-05-04 14:14:22,716 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败：Cannot run the event loop while another loop is running
Stack (most recent call last):
File<EMAIL_ADDRESS>line 995, in _bootstrap
self._bootstrap_inner()
File<EMAIL_ADDRESS>line 1038, in _bootstrap_inner
self.run()
File<EMAIL_ADDRESS>line 975, in run
self._target(*self._args, **self._kwargs)
File<EMAIL_ADDRESS>line 607, in run_forever
self._run_once()
File<EMAIL_ADDRESS>line 1922, in _run_once
handle._run()
File<EMAIL_ADDRESS>line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败：{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File<EMAIL_ADDRESS>line 629, in run_until_complete
self._check_running()
File<EMAIL_ADDRESS>line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
2023-05-04 14:14:23,214 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败：Cannot run the event loop while another loop is running
Stack (most recent call last):
File<EMAIL_ADDRESS>line 995, in _bootstrap
self._bootstrap_inner()
File<EMAIL_ADDRESS>line 1038, in _bootstrap_inner
self.run()
File<EMAIL_ADDRESS>line 975, in run
self._target(*self._args, **self._kwargs)
File<EMAIL_ADDRESS>line 607, in run_forever
self._run_once()
File<EMAIL_ADDRESS>line 1922, in _run_once
handle._run()
File<EMAIL_ADDRESS>line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败：{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File<EMAIL_ADDRESS>line 629, in run_until_complete
self._check_running()
File<EMAIL_ADDRESS>line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
复现步骤
对wukong说“进入极客模式”成功后，再任意向其说一句话，终端就会报错，错误信息见如上日志。

久未回复，先关闭本 issue 。


Use correct file descriptor to parse errors

File descriptors in use to parse errors from a few command
invocations were incorrect. This led to inability to detect
certain errors cases and act accordingly.
One of the easiest noticeable issues was when an image is deleted
but its RADOS keys and maps are still intact. In such cases
the DeleteVolume call always errored out unable to find the
image rather than, proceed with cleaning up the RADOS objects
and returning a success.
The original method of using stdout was incorrect, as the command
was tested from within a shell script and the scripts STDIN/OUT/ERR
was redirected to understand behavior. This is now tested using just
the CLI in question, and also examining Ceph code, and further
testing a couple of edge conditions by deleting backing images
for PVs
Signed-off-by: ShyamsundarR<EMAIL_ADDRESS>

The real solution is not to parse CLI output, but rely on some stable API, no?

The real solution is not to parse CLI output, but rely on some stable API, no?

The final solution is to not use CLI, even from a per-PV operations performance standpoint, as stated and tracked here.
Currently the code relies on CLI for all purposes, and the error stream reading and parsing needs a fix.

@Madhu-1 PTAL.


Slack invite - Expired

Describe the bug
Slack invite has expired.
Installed libraries and their versions
n/a
To Reproduce
Steps to reproduce the behavior:

Go to https://github.com/SoftwareBrothers/adminjs
Click on Join the community to get help and be inspired.
See error.

Expected behavior
An invite for the slack server should be provided.
Screenshots

AdminJSOptions with schema
n/a
Desktop (please complete the following information if relevant):
n/a
Smartphone (please complete the following information if relevant):
n/a
Additional context
Hire me :^)

Slack invitation link should be working now


Project layout proposal

This proposal isn't fully finished / thought out, nor grammatically appropriate, I'm sorry if it comes off rude. Know that that isn't my intention. I genuinely want help this project grow! But it's better for me to put this out now, so it can be commented upon while it's being refined
I'd like to propose a file and functionality layout for this project which to strive for:
TLWR of the goals of this proposal:

Break the current logic into multiple files and folders

Helps with understandability, debugging and management

Add support for managing multiple maps at once
Add support for running multiple servers at once
Allow for easier and more precise configuration of servers and maps

Move mostly if not completely to .json based config files
Map saving and backing up is more robust and configurable
Add support for having multiple icons and descriptions per server (secondary)
This includes changes in the folder structure

Proposed folder structure
> docs \
>   // Images used in `README.md`
>   -\ images \
> README.md
> // Minimal script used `require()` necessary files and start the server manager
> // Should also build chosen interface files (if any) when they're not there or old
> index.js
> // Holds all scripts and the data they generate, as not to create conflicts with the Minecraft Server executable
> manager \
>   // Holds unloaded maps (preferably as compressed files)
>   -\ maps \
>     // Holds an array of objects that define information about maps as outlined by the `Map` class
>     // Also holds a 'default' field, that if defined, holds the default map to load
>     --\ maps.json
>   // Holds .png files that would be used as the server icon seen in Minecrafts mutiplayer tab
>   -\ icons \
>   // Holds Minecraft Server .jar executables
>   -\ servers \
>     // Holds and array of objects that define information about custom servers as outlined by the `Server` class
>     // Also holds a 'default' field, that if defined, holds the name of the default server to load
>     --\ servers.json
>   // Holds backups of all maps. Filenames should consist of a timestamp and the world name
>   -\ backups \
>     // Holds an array of objects that define information about backups as outlined in the `Map` class
>     --\ backups.json
>   // Holds all bundled interfaces and the means to build them in their own folders
>   -\ interfaces \
>   -\ logs? \
> // Holds all files generated by the Minecraft Server executable
> server \

Proposed scripts
class MinecraftServer { // MinecraftServer.js
  // Provides a way to control the server (starting, stopping, commands, etc.
  // Is responsible for reading configs and setting up the server(s)
  constructor () {
    // Load all defined maps and hold them here
    /** @type {Array<Maps>} */
    this.maps = []
    // Load all defined servers and hold them here
    this.servers = {
      /** @type {string} */
      default: {/* name / id of default server to load */},
      /** @type {Array<Server>} */
      custom: [/* Load from servers.json */]
    };
  }
  // If empty load the default map, or create a new one and don't load it
  load (mapName) {}
  // If empty unload default one
  unload (mapName) {}
  // Check if map is loaded, check if server can be started, if not, download it
  start (mapName) {}
  stop (mapName) {}
}

/**
 * Utility class to be extended.
 * Interface to load / save configuration from .json files
 */
class Filebased? { // Filebased.js?
  constructor () {
    this.ready = false;
  };
  /**
   * Handle loading of data from a .json file
   * Should be able to handle errors sanely
   * Might want to move this to constructor
   * @param  {string} path Relative path to required file, from MinecraftServer.js's folder
   * @return {object}      Data held by file
   */
  load (path) {};
  // See above
  save (path) {};
  /**
   * Used for async operations
   * @return {Boolean}
   */
  isReady () {};
}

/**
 * Information about the minecraft world and its properties
 * Takes a loaded Map object as an argument
 * If user wants to create a new map, don't give the object and a default one will be used
 */
class Map extends Filebased { // Map.js
  constructor (
    object = {
      // True if the map has been loaded / saved once
      // Used to check if the map name, server etc. can still be edited
      static: false,
      // The world id / name
      name: 'world',
      // The id of the server object
      server: 'default',
      // The id of the properties object
      properties: 'default',
      // Motd string and icon shown in minecrafts multiplayer tab
      modt: [
        // If multiple objects one will be chosen randomly on load
        {
          message: 'A Minecraft Server',
          // A .png file stored in /icons or false if none
          icon: false
        }
      ],
      // Holds settings about how to handle the map
      config: {
        // How often in minutes to save the world and flush it to the hard disk
        // If an Integer, turn auto save off and issue the command manually
        // if less than one or 'auto' leave auto save on and only flush when backing up / stopped
        saveInterval: 'auto',
        // How often in minutes to backup the world
        // if less than one, turn automatic backups off
        backupInterval: 0,
        // Amount of backups to store before old ones are deleted
        // if less than one don't automatically delete old backups
        backups: 3
      }
    }
  ) {
    // This is a bit repetetive, but errors are easier to catch
    // Could use `Object.assign(this, object)`, but that's a bit error prone
    this.static = object.static;
    this.name = object.name;
    this.server = object.server;
    this.properties = object.properties;
    this.modt = object.modt;
    this.config = object.config
  };
  /**
   * Moves the world into into its servers folder if not already there
   * writes the properties into a .properties file
   */
  load () {};
  /**
   * (the server should be stopped)
   * Compresses the world and moves it into the map folder
   */
  unload () {};
  /**
   * (Auto saving should be off)
   * Create a compressed file of name [timestamp]__world_name, that holds two things:
   * - The world folder
   * - backup.json that holds the following object:
   * {
   *  timestamp: 'either our own timestamp string or Date.toString()'
   *  map: 'map name / id'
   * }
   */
  backup () {};
}

/**
 * Information about the Minecraft Server executable and how to manage it
 */
class Server { // Server.js
  constructor () {
    // Doubles as a id
    this.name = 'name';
    // Filename of the minecraft server executable
    // If file can't be accessed / isn't the correct version, try to redownload it
    this.file = 'file_name.jar';
    // If not a valid absolute path to a java executable, or the string 'default'
    // Detect default path using java_home.jar
    this.java = '/absolute/path/to/custom/java/executable/bin/java';
    // The minecraft server executables version. Can also be the string 'latest'
    this.version = '1.14.2',
    // The arguments used to start the server.
    // Always append 'nogui' by default, note this and some recommendations in the README
    // NOTE: This needs refining, as you cant mix commandline and JVM arguments carelessly
    this.arguments = '-Xmx2G -Xms256M';
    // Is an instance of Console when the server is running
    // Used to issue commands to and get output from the server
    this.console = null
  }

  start () {}

  stop () {}
}

class Console { // Console.js
  // Interface for reading and issuing commands to the server console
  // Could / should be used to allow a "live" interface with the server commandline
  constructor (stdin, stdout) {
    this.input = stdin;
    this.output = stdout;
  }

  run () {}
  // uses ^ run inside a setInterval()
  runPeriodically () {}
}

class Properties { // Properties.js
  constructor () {
    this.name = 'name';
    this.properties = {
      file: 'path_to_file',
      values: [
        {name: 'name', value: 'value'}
        ...
      ]
    };
    this.whitelist = [];
    this.ops = [];
    this.banned = {
      ips: [],
      players: []
    }
  }
  // Holds information about server.properties
  // Don't store usercache, let it be regenerated on map load
  // Allows editing of said properties
  get bannedIps () {}
  get bannedPlayers () {}
}

// Classes inside other classes mean that those classes would create an instance of said subclasses
// The plan is to have most if not all of the configuration files inside .json files for easier setup / modifying
class MinecraftServerApi { // MinecraftServerApi.js
  // Interface between MinecraftServer and the website
  // Also should be responsible for creating and starting the webserver
}

class Updater? { // Updater.js?
  // Allows downloading and installing minecraft servers
  // Used even when no versions found
}

Proposed project To-Do

[ ] Once all functions have JSDoc type documentation, look into generating documentation files in /docs
[ ] Look into creating and loading maps into ramdisks (I think this is only doable on Unix based systems)
[ ] Maybe add a commandline interface
[ ] Look into a an Idle manager, that turns the server off when its empty and back on when someone tries to connect to it

[ ] Could make the server turn on only for ops

Proposal Todo:

[ ] Grammar and just generally making the proposal more descriptive
[ ] Add rest of the JSDocs (aka. design the files / functions)
[ ] Allowing multiple servers to run simultaniously could be achieved by giving serves their own folders under /server

This isn't done yet, but the main idea is now there


Make tray menu skins

Tray menu should use skins, color schemes etc. Not only menu, but every component there.
So we should provide that mechanism. Users like it :)

I see gray(default), black and orange-black.

One moment - i changed skin to dark, but main tray menu remains gray, why?

One more thing - i change skin from gray to dark, re-launch tray and see that it is gray. But when i check settings, i see that dark skin is selected there.

Done


Improve display of validation errors

Not able to get any file or line info, though

I did some digging and it seems that the DacModelMessage class doesn't expose those details. They are available on the DataSchemaError class, but that is internal as with pretty much everything from DacFx which is a bit of bummer.

That project needs to be open sourced!
@vickyharp ?

@ErikEJ I had another look this mroning and I noticed that the TSqlModel class exposes GetModelErrors() method which exposes a list of DacModelError instances which I believe contains the information we are looking for here. Looking at the implementation I don't think we even need to call Validate() first, which is a bit weird, but I do think we can get richer diagnostics including source information using that method.

So we should redo validate, or just use GetModelErrors if there are any validation messages?

Not sure. Guess we'll have to see if Validate() returns the same messages as GetModelErrors() or not. Looking at the decompiled sources it seems that they both have their unique code paths but similar implementations.

I just tried giving GetModelErrors() a try but it seems that it returns an empty list at least for our test project which includes an error. Guess we'll have to do some more digging to figure out what will actual result in a "model error".

I've managed to get to the validation errors through some reflection magic and that gives us the TSQL object that has the validation error including a line number and column. It does not however give us the source file that defined that object in the first place. That makes sense since we are essentially reading the source file from disk and then passing the script as is to the TSqlModel. Perhaps there's a way to tell the TSqlModel to read the script file itself so that it knows where that object has been defined.

Maybe use this: øhttps://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.dac.model.tsqlmodel.addorupdateobjects?view=sql-dacfx-150#Microsoft_SqlServer_Dac_Model_TSqlModel_AddOrUpdateObjects_System_String_System_String_Microsoft_SqlServer_Dac_Model_TSqlObjectOptions_

@ErikEJ Yes, that is what I'm using now. I had to do some more reflection gymnastics to actually get to that data though but I think I've managed to make this work now. I now get full source information out of the build process. I'll have to test this on Windows to see if this works good with Visual Studio as well, but I'm confident that it'll work.
I also snug in a nice improvement to make our life easier. You can now run dotnet build /p:MSBuildSdkSqlProjDebug=True which will have the DacpacTool wait for a debugger to attach before continuing. Of course this is only included in the Debug configuration and not actually shipping in the package.

@ErikEJ Just tried a beta version of this in Visual Studio and it looks like warnings and errors show up nicely in Visual Studio with a mapping to the source file where the error/warning occurs:

@ErikEJ @jeffrosenberg Could you both give this a review?

LGTM

@jeffrosenberg I've tweaked the CONTRIBUTING.md a little. Does this make it clearer?

@jmezach yes, looks a lot clearer to me, thanks!

Let's get this merged and release it as 1.7.0 together with #58 and #59.


cmake: don't limit generation of pkg-config file to only unix

Dependent on https://github.com/bbc/libMXF/pull/6
Makes it so that it generates the .pc file when using non-unix systems like with mingw-w64 cmake from msys2.

I know it's a draft but the changes should be LGTM. I guess you can't set the PR base to the other PR, which is unfortunate. See also comments from https://github.com/bbc/libMXF/pull/6.

opened PR on the bmx repo