export.h gets overwritten when installing shared and static targets into same prefix

Hi Alex,
I recently discovered your blog post about Building a Dual Shared and Static Library while trying to figure out the same thing. It was very helpful, thank you!
I encountered one problem, though, which is either a bug or a lack of understanding on my part.
I cloned this example project and built and installed it exactly like you did in the blog.
$ cmake -S . -B build-shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=Release
$ cmake -S . -B build-static -DBUILD_SHARED_LIBS=NO  -DCMAKE_BUILD_TYPE=Release
$ cmake --build build-shared
$ cmake --build build-static
$ cmake --install build-shared --prefix ./bin
$ cmake --install build-static --prefix ./bin

After examining the installation directory, I noticed that, depending on which target was installed first, the export.h file was different. It gets overwritten on each install.
When generated for the shared target, it looks fine. The __attribute__((visibility("default"))) expressions are present. When generated for the static target, these expressions are missing. All macros are empty then. When studying the GenerateExportHeader docs, this also works exactly, how it is described.
In my understanding, the export.h file should always look like the one for the shared target. When building the static target, the SOMELIB_STATIC_DEFINE should take care of defining the empty macros. But to make this work, one would have to create some kind of dummy shared target in addition to the static target, I guess.
What's your take on this?
Kind Regards

Yuck... this is a real bug. I'm not sure what the best solution is. Three options jump to mind, in no particular order:

We could call this a CMake bug and try to work with the maintainers to:

Always have generate_export_header generate the same file regardless of library type
Have generate_export_header add the static define to the target, guarded by a generator expression that checks the library type.

We could say that when using this approach, you have to install the shared library second because of the aforementioned bug.

I agree it shouldn't have to be this way, but alas.
It might be possible to use install(CODE) to check that the static install doesn't overwrite a shared export.h.

We could have each build generate a separate export header: export_static.h and export_shared.h. An intermediate header export.h would dispatch between the two depending on whether SOMELIB_STATIC_DEFINE is set.

Yes this is horribly redundant.
On the other hand, it's tolerant to other divergences between the two header sets that CMake might (misguidedly, imo) introduce in the future.

Thanks for the fast reply! I came up with this solution for the time being:
macro (generate_export_header_shared _target_name _export_header_relative_path)
    if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${_export_header_relative_path}")
        include(GenerateExportHeader)

        message(CHECK_START "Generating export header")

        get_target_property("_${_target_name}_SOURCES" "${_target_name}" SOURCES)
        add_library(__ExportDummy__ SHARED)
        target_sources(__ExportDummy__ PRIVATE "${_${_target_name}_SOURCES}")
        set_target_properties(
            __ExportDummy__
            PROPERTIES
            DEFINE_SYMBOL "${_target_name}_EXPORTS"
            EXCLUDE_FROM_ALL True
            EXCLUDE_FROM_DEFAULT_BUILD True
        )

        # This header contains macros to define ABI visibility of functions
        generate_export_header(
            __ExportDummy__
            BASE_NAME "${_target_name}"
            EXPORT_FILE_NAME "${_export_header_relative_path}"
        )

        message(CHECK_PASS "done")
    endif ()
endmacro ()

It basically creates a dummy shared target, copies over all the sources from the actual target and excludes the dummy from all possible builds.
But I still think, this should be escalated to the CMake devs, somehow.

To comment on your suggestions:

1. We could call this a CMake bug and try to work with the maintainers to:

   1. Always have `generate_export_header` generate the same file regardless of library type
   2. Have `generate_export_header` add the static define to the target, guarded by a generator expression that checks the library type.

For me, this should be the solution. It reduces boilerplate code and just works as expected, no matter what target it is used on.

2. We could say that when using this approach, you have to install the shared library second because of the aforementioned bug.

   1. I agree it shouldn't have to be this way, but alas.
   2. It might be possible to use `install(CODE)` to check that the static install doesn't overwrite a shared `export.h`.

Relying on the user of your library having to respect the correct order of install sounds just wrong and would probably fail for many users.
To 2.2: If the user for some reason only builds and installs a static variant, the header would still have to be created and installed correctly.

3. We could have each build generate a separate export header: `export_static.h` and `export_shared.h`. An intermediate header `export.h` would dispatch between the two depending on whether `SOMELIB_STATIC_DEFINE` is set.

   1. Yes this is horribly redundant.
   2. On the other hand, it's tolerant to other divergences between the two header sets that CMake might (misguidedly, imo) introduce in the future.
   3. The intermediate header is fixed and so is safe to overwrite.

This might be a robust solution, if redundant, solution if the CMake devs won't fix this when brought to their attention.
I came up with the above macro solution in the meantime.

For me, this should be the solution. It reduces boilerplate code and just works as expected, no matter what target it is used on.

I agree, though it wouldn't solve anything for users of earlier versions.

To 2.2: If the user for some reason only builds and installs a static variant, the header would still have to be created and installed correctly.

Which it does already if only the static variant is built. My suggestion is that the static build only should check if the export header already exists (because the shared variant is already installed) and then refuse to overwrite it.

This might be a robust, if redundant, solution if the CMake devs won't fix this when brought to their attention.

This might be somewhat shorter & simpler to maintain than the macro. If you have time before I do, please open an issue with Kitware/CMake upstream. Otherwise, I can get to it sometime next week.

Upstream issue has been opened: https://gitlab.kitware.com/cmake/cmake/-/issues/23195

It feels weird to have different headers for different usage of shared/static libraries. If there are any changes it should be already compiled out, not have it present in the api header. Otherwise downstream has to implement different interface as well depending on how the library is built. This would be even more problematic when SomeLib_SHARED_LIBS is specified at the end of a chain, e.g. A->B->C and when building A we pass -DC_SHARED_LIBS=OFF and B has to adjust its implementation accordingly.
I think this use-case should rather be flagged as an inappropriate design. Would be curious to see real world applications where different headers have to be defined for shared/static libraries.


注册在多个注册中心的服务，客户端不能进行广播cluster="broadcast"不生效

[x] I have searched the issues of this repository and believe that this is not a duplicate.
[x] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.5
Operating System version: xxx
Java version: 1.8

Steps to reproduce this issue

服务A helloservice注册在注册中心“shanghai”
服务B helloservice注册在注册中心"beijing"
客户端使用集群广播模式，订阅注册中心 “shanghai,beijing”无法对服务A，B进行广播

Pls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps？
Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
Just put your stack trace here!

自己再研究研究，能使用方法不对


⚠ Maple - Cloud Services has degraded performance

In f3fe74e, Maple - Cloud Services (https://files.zyradyl.moe) experienced degraded performance:

HTTP code: 523
Response time: 7273 ms

Resolved: Maple - Cloud Services performance has improved in 7832384 after 4 minutes.


Gatewayd NG implement backup/restore

With the migration to using client NG, we did not implement backup/restore for gatewayd. Since gatewayd is a collection of clients, it is important to be able to back these up and restore them so operators do not loose their funds.

Not sure if you meant that or only exposing an API, but currently only the e-cash module has a real backup/recovery implementation. We should make the other modules recoverable in general (deterministic peg-in tweaks, LN user redeem keys, etc. and scanning for contracts belonging to us).

Not sure if you meant that or only exposing an API

Yes, I meant implementing the already exposed API for backing up/restoring the gateway's ecash.

https://github.com/fedimint/fedimint/issues/2650 and this will be complicated to do at same time

Fixed with https://github.com/fedimint/fedimint/pull/5908


directory integration tools

the above information helps me to evolved directory integration tools. Check out our blogs: https://www.ssogen.com/oracle-ebs-sso-integrations/

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

ID: 6865c730-34cc-42a7-544e-597536b1bfd5
Version Independent ID: b2955f76-2767-bb73-e00a-8017c9514094
Content: Hybrid Identity: Directory integration tools comparison
Content Source: articles/active-directory/hybrid/plan-hybrid-identity-design-considerations-tools-comparison.md
Service: active-directory
GitHub Login: @billmath
Microsoft Alias: billmath

@abdullah58 Thanks for the feedback and providing the blog!


vendor: update github.com/yuin/goldmark to v1.1.24

Fix #10542

I will block because it seems to have updated too much files in the vendor folder

It seems that vendor are not uptodate with go.mod but they should have failed previously on CI. 😑

This is good for review now.

ping lgtm


Pull effect error

Hello,
I implemented this library inside my app to refresh a web page. The only problem is that every now and then (not always) to drag at the bottom of the screen, the effect does not follow the movement of the finger, but remains fixed.
Direction of elastic effect is blocked!
Does it happen to others?
iOS: 11 Swift: 4.1

same problem


Detect gh-pages

Sometimes there's a gh-pages branch for a repo but it isn't linked anywhere so one has to type 'username.github.io/repo`.

I do not have the 'GH Page' button, I guess it's added by some other extensions you installed.

@camsong Yes, I just modified the html from dev tools. I think it would be something helpful this extension could add.

Aha, good idea :clap: let me add this feature

Implemented in v0.8.1

:clap:


im having an issue where it tells me i dont have enough balloon blocks when i have way more than enough. (82/148)

You do not have enough, you need double the amount of balloons as each balloon only provides 2 balance in this update and includes themselves

This is something that's being addressed for 1.5 fabric and it's forge equivalents, but for now you need a fair few more

I should probably point out this is somewhat of a bug, since in the screenshot you have 74 balloons which means theoretically you can only have 74 other blocks

I calculate 82 other blocks on your vehicle so you could lift it with 82 balloons theoretically


Add docker instructions.

Issue: https://github.com/Islandora/documentation/issues/1614
Purpose / why
To document how to use ISLE for 8!
What changes were made?
I added an 'installation' page called "Docker (ISLE)" beside "Ansible Playbook" (which was formerly "Automatic Provisioning"). It covers what @dannylamb walked me through during Thursday's user call of spinning up a simple Isle ... box?
Verification
Best verification is to get someone unfamiliar with using Docker to follow these instructions to successfully create a working Islandora.
Does this documentation work?
Does this documentation include lies that are apparent to someone who knows more about Docker, Docker compose, and ISLE?
I'd like to propose that the following terminology questions get discussed not as part of this pull request, because the PR format is a terrible place to do that, but please bring your thoughts to an upcoming tech call. To not get caught up in that, can this PR be focused on 'good enough to add and make things better'?

What is the thing that Docker creates? It's not a "vm" but is it a "box"? a "machine"?
What nouns does "Isle" go with? Is this an "ISLE site"? do you upgrade "your ISLE" when you do git pull?
What is the OS agnostic word for a Terminal window? I think I tried to use "shell" and/or "command line".

Interested Parties
@g7morris @dannylamb
and folks who were on that call: @manez @ajstanley @highermath
Checklist

Pull-request reviewer should ensure the following

[x] Does this PR link to related issues?
[ ] Does the proposed documentation align with the Islandora Documentation Style Guide?
[ ] Are the changes accurate, useful, free of typos, etc?

Person merging should ensure the following

[ ] Does mkdocs still build successfully? (This is indicated by TravisCI passing. To test locally, and see warnings, see How To Build Documentation.)
[ ] If pages are renamed or removed, have all internal links to those pages been fixed?
[ ] If pages are added, have they been linked to or placed in the menu?
[ ] Did the PR receive at least one approval from a committer, and all issues raised have been addressed?

Wish I had been there! I was just thinking about trying to figure this out this morning.
I see that the PR is still in Draft state; want me to be a Docker neophyte tester once it is ready for review, @rosiel?

Seth - it'd be great if you could give it a try! I'll start a slack discussion for faster/more open and iterative chatting, and use the results to improve this PR.

@rosiel, it looks like 4 GB of memory is enough to get isle-dc enough space to test things out. So OS X users should up Docker Desktop's default 2 GB memory to 4 GB before starting things up.

I'm relieved it can run with less, but Nigel said 8 on slack... have you run it through any paces yet?
I alluded to composer later in the pr and I know that it's a memory hog. Maybe that's why Nigel suggested more.
I noticed that when I changed the memory and rebooted docker, my containers were down, but the state seemed to have persisted. Would it make sense to give Docker (Desktop) more memory when you are updating things with composer, and then set it back down to a lower amount for normal use?

@nigelgbanks had done a resource count that totalled up to ~7GB. It looks like fits, fcrepo, cantaloupe, and blazegraph were the heaviest users with alpaca and activemq following up behind.
My testing wasn't resource intensive... just manually adding a few items and poking the different features. So I would probably say 4 GB minimum for demo, 8 GB for dev, and then 16 GB for prod.

Thank you for your help and comments @seth-shaw-unlv @dflitner @noahwsmith @manez . Is anyone available to "do the review"?

Following through the instructions one last time for review 👍


Investigate making app registry requests

Mainly want to see what kind of permissions are required.
Figure out exactly what auth is   required.

I was able to generate an app registry jwt, and use it to make an http request of the app registry api from my devpod.  Details here:
https://confluence.uberit.net/display/ENG/Astral+Implementation+Details

Looks good to me


mosh-server fails due to libprotobuf

@ajmazurie commented on Fri Apr 07 2017
Hi, it would appear that the mosh package fails to run on a stock CentOS 7 box:
$ conda install -c conda-forge mosh=1.2.6
$ mosh-server
mosh-server: error while loading shared libraries: libprotobuf.so.10: cannot open shared object file: No such file or directory

Indeed, I cannot find libprotobuf.so.10 in my conda/lib directory; only libprotobuf.so.12. If I attempt to symlink the later into the former, I get another error message:
mosh-server: symbol lookup error: mosh-server: undefined symbol: _ZN6google8protobuf8internal13empty_string_E

Here are some additional information about the environment:
$ conda list
...
conda                     4.2.13                   py27_0    conda-forge
conda-env                 2.6.0                         0    conda-forge
libprotobuf               3.2.0                         0    defaults
mosh                      1.2.6                pl5.20.3_2    conda-forge
...
$ conda info
Current conda install:

               platform : linux-64
          conda version : 4.2.13
       conda is private : False
      conda-env version : 4.2.13
    conda-build version : not installed
         python version : 2.7.13.final.0
       requests version : 2.12.4
       root environment : /home/amazurie/.conda  (writable)
    default environment : /home/amazurie/.conda
       envs directories : /home/amazurie/.conda/envs
          package cache : /home/amazurie/.conda/pkgs
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/r/linux-64
                          https://conda.anaconda.org/r/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/blaze/linux-64
                          https://conda.anaconda.org/blaze/noarch
                          https://conda.anaconda.org/conda-cluster/linux-64
                          https://conda.anaconda.org/conda-cluster/noarch
                          https://repo.continuum.io/pkgs/free/linux-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/pro/linux-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : /home/amazurie/.condarc
           offline mode : False

Am I missing something here?

@jakirkham commented on Fri Apr 07 2017
Thanks for reporting. Though this should be reported at the mosh feedstock (not here where it will get lost). Am moving it over.

@ajmazurie Thanks for reporting. @jakirkham how do the feedstock maintainers get informed when the soname of a dependency is changed? Would it make sense if conda-forge-admin sends a PR automatically to increase the build number so that the package is linked to the library with new soname?

Unfortunately this stuff is handled semi-manually at the moment. We should pin the version of protobuf used here and add it to the pinning script. The pinning script is suppose to send build number bumps with version changes when those occur. Unfortunately that has been broken and has yet to be fixed.

If there is a specific version of protobuf that mosh expects I can probably install it manually; do you happen to know what is this version number?

I also installed mosh on macOS and the version dependency seems incorrect for mosh 1.2.6 to link protobuf: 3.3.2 instead of 3.2.0. So far the workaround is to manually downgrade protobuf to the required version. Is it unsafe to pin the version to be just 3.x?
$ conda install mosh
Fetching package metadata ...............
Solving package specifications: .
Package plan for installation in environment /Users/farleylai/miniconda3:
The following NEW packages will be INSTALLED:
mosh:     1.2.6-pl5.20.3_3 conda-forge
ncurses:  5.9-10           conda-forge
perl:     <IP_ADDRESS>-2       conda-forge
protobuf: 3.3.2-py36_0     conda-forge

Proceed ([y]/n)? y

This should be solved now, could you please try to install latest mosh?

Closing this, feel free to open if it's not fixed.

Should add that I have also just pulled all packages that used either protobuf or libprotobuf without version pinning, which should avoid this issue from reoccurring. Please double check this if you have a moment @gokceneraslan. Can see the version constraints of each package by clicking the little "i" next to each package name.
Also PR ( https://github.com/conda-forge/mosh-feedstock/pull/6 ) just merged to switch to conda-forge's recently added libprotobuf package with correct pinning, which should lighten the dependency. In the near future conda-build 3 will be used for building packages, which should automatically track dependency version constraints of things like mosh w.r.t. libprotobuf.


Possible miscompilation error?

Hello, I've found a strange error and I'm not sure what the problem might be. I've been trying to use ESP32 + SCD41 with no luck. I tracked down the problem to this piece of code:
// source https://github.com/Sensirion/sensirion-i2c-rs/blob/master/src/crc8.rs#L11-L25
pub fn calculate(data: &[u8]) -> u8 {
    const CRC8_POLYNOMIAL: u8 = 0x31;
    let mut crc: u8 = 0xff;
    for byte in data {
        crc ^= byte;
        for _ in 0..8 {
            if (crc & 0x80) > 0 {
                crc = (crc << 1) ^ CRC8_POLYNOMIAL;
            } else {
                crc <<= 1;
            }
        }
    }
    crc
}

For the given example data [9, 94] the correct result should be 35 but I'm getting 55. It works correctly on the blank Rust project using cargo new but it fails when I deploy the code to my ESP32.
I've created an example here https://wokwi.com/projects/345876589283639891 with 2 identical calculate functions, the only difference is that one of them has println! macros inside. However, the result differs.
Does anyone know what's going on? What am I missing?
Configuration:
➜  rust-esp32-std git:(master) ✗ rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/tomas.vojtasek/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin
esp
esp-<IP_ADDRESS>

active toolchain
----------------

esp (directory override for '/Users/tomas.vojtasek/fun/rust-esp32-std')
rustc 1.64.0-nightly (f53d2361e 2022-09-20)

----------------

esp (directory override for '/Users/tomas.vojtasek/fun/rust-esp32-std')
rustc 1.64.0-nightly (f53d2361e 2022-09-20)

➜  rust-esp32-std git:(master) ✗ ./install-rust-toolchain.sh
Processing configuration:
--build-target          = esp32,esp32s2,esp32s3
--cargo-home            = /Users/tomas.vojtasek/.cargo
--clear-cache           = YES
--esp-idf-version       =
--export-file           = export-esp.sh
--extra-crates          = ldproxy cargo-espflash
--installation-mode     = install
--llvm-version          = esp-14.0.0-20220415
--minified-esp-idf      = NO
--minified-llvm         = YES
--nightly-version       = nightly
--rustup-home           = /Users/tomas.vojtasek/.rustup
--toolchain-version     = <IP_ADDRESS>
--toolchain-destination = /Users/tomas.vojtasek/.rustup/toolchains/esp
/Users/tomas.vojtasek/.cargo/bin/rustup
nightly-aarch64-apple-darwin

Chip: Espressif ESP32-WROOM-32 (https://www.laskakit.cz/laskakit-esp-vindriktning-esp-32-i2c/)

Tried on ESP32 and got 35.

I've updated the comment with my configuration

Tried with both versions from https://wokwi.com/projects/345876589283639891 and also with overflowing_shl. Both of them return 35.
I don't want to update my toolchain yet to 1.64.
pub fn calculate(data: &[u8]) -> u8 {
    const CRC8_POLYNOMIAL: u8 = 0x31;
    let mut crc: u8 = 0xff;
    for byte in data {
        crc ^= byte;
        println!("crc tmp: {:02x}", crc);
        for _ in 0..8 {
            if (crc & 0x80) > 0 {
                println!("top bit is high");
                //crc = (crc.overflowing_shl(1)).0 ^ CRC8_POLYNOMIAL;
                crc = (crc << 1) ^ CRC8_POLYNOMIAL;
            } else {
                println!("top bit is low");
                //crc = crc.overflowing_shl(1).0;
                crc <<= 1;
            }
        }
    }
    crc
}

pub fn calculate2(data: &[u8]) -> u8 {
    const CRC8_POLYNOMIAL: u8 = 0x31;
    let mut crc: u8 = 0xff;
    for byte in data {
        crc ^= byte;
        for _ in 0..8 {
            if (crc & 0x80) > 0 {
                //crc = (crc.overflowing_shl(1)).0 ^ CRC8_POLYNOMIAL;
                crc = (crc << 1) ^ CRC8_POLYNOMIAL;
            } else {
                //crc = crc.overflowing_shl(1).0;
                crc <<= 1;
            }
        }
    }
    crc
}

Hi @vojty, sorry you've been running into this issue. Fortunately, its a duplicate of https://github.com/esp-rs/rust/issues/134 which we already have a fix for! It will be released in the next 2 weeks with the 1.65 Rust toolchain. I tested your code with the new LLVM version locally and it works correctly with your input data :).
I'll close this for now, in favour of the tracking issue here: https://github.com/esp-rs/rust/issues/134.

@MabezDev Thank you!

Thanks for the update, it seems like it's not entirely fixed. For me, it works on all opt-levels apart from when opt-level = 's', is this the case for you?

I can confirm that `opt-level = "z" works just fine


Is this library intended for use as part of ongoing development?

Apologies if this question should have be asked in a different forum, but wondering about the intended use of this library. It looks primarily designed to bootstrap an entire backend server based on a GraphQL schema (which is neat). I wonder if you also intend for it to be used as a more modest utility that keeps a file (or files) of generated pydantic dataclasses/models in sync with the GraphQL schema.
So the workflow would be:

Modify the GraphQL schema
Run the utility
Reference any newly generated models in resolvers (or immediately get the benefit of having existing models updated)

Perhaps the contract would be: each *.graphql file in the repo gets it's own *.py companion with the relevant type definitions.

Issues are only for tracking the roadmap. We ask in our readme that usage questions be raised on Ariadne's discussions :)


controlsd: add state machine tests

Also handle noEntry events in preEnabled, assuming all softDisable events have a noEntry event type, which should be asserted by a test somewhere

Tests failed as expected when commenting out various state assignment lines in state_transition (self.state = State.disabled)


Potential stability issues with release 1.8.1-dev?

Hi,
Creating this issue for awareness and/or to help me figure out if there is indeed an issue. I have been recently using the release-1.8.1-dev branch because of some of the new features I wanted to add. I saw there has been some major refactoring, and I have seen some strange behaviors. I don't know if this is pure coincidence or if this is caused by 1.8.1-dev.
Things I have noticed are below. Note that I have enabled weblogs with a maxEntries of 500 (have I run into low memory issues? no idea, no serial connection, only wifi). I never reached 500 entries, the highest I have seen was around 300-ish.

At some points, a ton loads of wifi-disconnects with very long delays to reconnect
When I turned off verboseWifiReconnect(), the "Wifi Disconnects" count  remained at 0. But while at 0, using iOS Home app, the accessories were in a strange "No response from accessory" state I had not seen before, whereas the accessory button / icon was simply white. Like, partly responding. And on iOS 17, the accessory said "2 on" while on iOS 16 it said "the accessory is not responding".

I'm now switched back to master and will monitor for a day or two, then switch back to release-1.8.1-dev and re-enable setWebLogCallback(extraWebData) and setVerboseReconnect(false), to see if this strange behavior will re-occur.
The thing is, I'm connected to an external 12v, so I can connect USB at the same time to look at the serial logs.
.. or maybe I can just connect to USB now that I know why I kept getting brownouts.. ;-) and turn on serial once / if the issue reoccurs with release-1.8.1-dev.
Any other suggestions?

I did indeed do a lot of refactoring of various parts of the code in order to reduce memory usage.   Others have found HomeSpan would not run with certain other libraries, especially when using Bluetooth, which turns out to be very resource intensive.
When I first coded HomeSpan I made use of a lot of large fixed-sized buffers to store web responses, encrypted data, etc.  This works fine but such buffers are pulled from the stack (instead of the heap) and it's never the case that all are used at the same time, so I'm reserving more space than needed.  Since stack space is limited, I converted all the fixed-size buffers to dynamically-allocated temporary buffers of exactly the size needed at any given moment.  I have a simple utility (TempBuffer) that handles creation/destruction automatically.   Replacing all the fixed buffers with TempBuffers freed up quite a bit of RAM (between 30-50 KB), and leaves the stack open for others to use (such as the Bluetooth library).
I also completely re-worked storage for Controller info (IDs, crypto pairs, etc.).  HAP requires all devices to be able to store info for 16 Controllers.  But as HomeKit evolved over the years, and especially since the intro of using a Home Pod as a Hub, most HomeKit instances only utilize a few Controllers.  So now instead of having a fixed buffer sized for 16 Controllers worth of data, I use a dynamic vector that creates Controllers only as needed.
I also reworked the TLV section of the code to make it a little more streamline as well as facilitate the use of TempBuffers in areas of the code related to TLVs.
I don't think any of the changes would have created the issues above, but I'm very interested in what your tests reveal when comparing the master branch to release.1.8.1-dev.
I also made a number of other changes to a different branch (called server) in which I further reduced memory usage by getting rid of the fixed number of HomeKit connection slots and replacing with a dynamic vector.   When I first started HomeSpan, HomeKit would typically require 8-14 individual HAP connections.  But once HomePods were used for Home Hubs, most devices only require 1-3 connections.   This change seemed to cause some issues, but I could not reliably reproduce.  Instead of holding things up I decided to pause on development of the server branch and forked the 1.8.1 branch just before the commits for these additional changes.

I've just tried 1.8.1 with a simple sketch and 300 weblog entries.  No issues so far, though I see the memory drag.  Note you need to track the minimum heap memory, not just the current heap memory.  If you type 'm' into the Serial Monitor it provides both current and minimum.

Thanks, I will add the same code from db0f5222977082f57282845b80da08503d3543c7 into my new extraWebData callback ;-)
Is there a method where I can see how many HAP connections are used at any given time? I'd also add this to the extraWebData callback.
I don't know if this is documented somewhere, but what is defined as a "HomeKit controller" actually? I have two AppleTV (gen3 & gen4), one iPad running iOS 17.1, with both Apple Home and Eve (so try & test), and 3 iPhones (iOS 16.7.2, 17.0, and 17.1) with all 3 of them with Home app, and one of the iOS 16.7.2 one also has Eve, for try & test. So how many connections should I defined for HomeSpan? Is it one connection per app, per device, to HomeSpan itself?

There is no method to return the number of HAP connections but you can probably copy over some of the code in the 's' command that prints a bunch of statistics, including HAP connections (see around line 606 in HomeSpan.cpp).
A HomeKit Controller is any device that can be used to connect to a HomeKit Accessory, so that includes everything you listed above.  However, in HomeSpan I use the term Controller to refer to a specific Controller that has been authorized to communicate with the Accessory.  The initial authorization is done when a device is first paired, and HomeSpan stores the required authorization codes for that Controller.  Then, whenever a device want to open a HAP Connection to the Accessory, it first needs to provide its Controller credentials, which HomeSpan cryptographically matches against its records to validate the authorization.
Before Home Hubs (around iOS 14 and earlier), every device would need to open its own HAP Connection.  So if you have 2 phones, 3 HomePods, and a Mac, you would wind up with 6 HAP connections - each based on the IP address of the device.  But there is NOT a one-to-one mapping of "controlling devices" and Controller Credentials.  The 2 phones, 3 HomePods, and Mac, may all request a HAP connection using the same Controller Credentials as was originally created when pairing.
A Controlling device may also request that the Accessory add another set of Controller Credentials to its list, which is why HomeSpan may show more than one set of Controller Credentials when you type the 's' command.  I have never figured out why it does this, or how it decides which Controller Credentials to use for any given connection.
But then Home Hubs came along and instead of having each phone, HomePod, Mac, etc. establish it's own HAP Connection, now HomeKit uses just one device (a HomePod or Apple TV) to communicate with the Accessory, and handles all communication between iPhones, Macs, etc. behind the scenes.  If you use a Home Hub you will in fact see that no matter which device you use to operate an Accessory, HomeSpan usually sees the request coming from the same IP (likely that of the Home Hub).
This means that there is no reason for HomeSpan to support up to 14 simultaneous connections, which is something I hope to eliminate in the future to save memory.
The Home Hub also makes a lot of the Home Span processing simpler.  Prior to Home Hubs,  controllers never communicated with each other.  This means if you use the Home App on a Mac to turn on a light, the Home App on your iPhone had no idea you did this and would show the light was still off.  Apple required all of the logic to sync up devices to reside in the Accessory itself.  So there is a lot of code in HomeSpan that is used to broadcast changes in the status of each Accessory to all HAP connections whenever any Controller changes anything.  It's actually fairly complicated and involves each Controller "subscribing" to various notifications from HomeSpan so HomeSpan know which Controllers want to be updated for which Characteristics.
Home Hub did away with all of that.  Now when you turn on a light with a Mac, the Home Hub tells HomeSpan you want to turn on the light, and if successful the Home Hub than tells all other Controllers that the light is now on.  HomeSpan does not need to let every other Controller know.

wow, thanks for all the details!
Murphy's law: everything has been stable so far. I have to reboot my router to force wifi disconnects to happen.

If you use a Home Hub you will in fact see that no matter which device you use to operate an Accessory, HomeSpan usually sees the request coming from the same IP (likely that of the Home Hub).

Interesting. And this is solving a mystery I had, which is why Home app was showing my two AppleTVs as "Paused" while they seemed completely off (white light turned off). I will see if I can add reverse DNS (or mDNS) lookups so I can log the local hostname rather than IP address. I never realized the IP address logged in WebLog events were not the IP of the iPhone changing the alarm system state, but the IP address of the 3rd gen AppleTV.. Good to know!
I'm still having issued logging hap[i]->client.remoteIP() ... even when checking non-null, something seems to be crashing when used in the callback. I guess I'll have to connect to serial to see the real deal.

I may have nailed down why the board kept going offline.
I added this code in the Span::begin() method to troubleshoot:
  WiFiEventId_t eventID = WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info){
    WEBLOG("WiFi lost connection. Reason %u", info.wifi_sta_disconnected.reason);
  }, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_DISCONNECTED);

What I saw was BEACON_TIMEOUT (200) followed by 4 or 5 AUTH_FAIL (202) and then some AUTH_EXPIRE (2) ... reference: https://docs.espressif.com/projects/esp-idf/en/v4.2/esp32/api-guides/wifi.html
That then led my thoughts to ESP built-in power-saving modes.
From the Power Saving Modes, it states

Set power down mode for an RTC power domain in sleep mode. If not set set using this API, all power domains default to ESP_PD_OPTION_AUTO.

.. and that includes WiFi, which is under ESP_PD_DOMAIN_MODEM
For my use of HomeSpan, I don't want WiFi to go into power saving mode. I think this is why I kept getting these disconnects. Longevity test is underway. 48 hours without a disconnect will be a good sign.
If that turns out to be the issue, I have two options. Either I call esp_wifi_set_ps() directly like here, or HomeSpan gives protected access to its WiFi class member so HomeSpan users can use WiFi.setSleep(true).
Do you have a preferred approach before I embark on another PR? I think the latter might  be cleaner and safer long term.

I'm not sure that's the issue - if it was I'd imagine this problem would be pervasive an HomeSpan would lose connectivity all the time.  Is there something perhaps specific to your setup?  Of course it always pays to try out the change and see if it solves the issue.

if it was I'd imagine this problem would be pervasive an HomeSpan would lose connectivity all the time.

True.

Is there something perhaps specific to your setup?

Recent WiFi 6 router (Deco X50), 2 units. One far away, but I have it configured so that the ESP board connects to the nearest one, and enforcing 2.4GHz as the board is in a garage (where alarm panel is) and the AP is in a closet almost right above the board on the upper floor.
WiFi signal is at -48dBm (which is hear is somewhat ok), at max WiFi Tx Power (19.50 / 19.50 dBm).

.. quick update, that didn't do it. Still lots of beacon timeouts intertwined witth AUTH_FAIL, as well as reacon code 39 which is  not defined (!?!?).
Thereis also some strange behavior coming from another 3rd party library I use.
It is starting to look like some kind of slow memory corruption...

Something is definitely going wrong. I had to use Wireshark to see what was coming back from the weblogs.
As you can see below, the frame that has the beginning of the HTTP response shows that the Content Type is then intertwined with
 rows...

I must be doing something wrong.. This is my memory usage:

Memory
Value

DRAM Total:
4365 Kb

DRAM Free now:
4207 Kb4207 Kb4207 Kb

DRAM Free Lowest Achieved:
4191 Kb4191 Kb

Total Heap:
181 Kb

Free internal heap size:
145 Kb

Free Internal Lowest Achieved:
171 Kb

IRAM-Capable (exec)
161 Kb

Free Exec Lowest Achieved:
161 Kb

Total SPI RAM:
4095 Kb

using this code:
  heap_caps_get_info(&heapInfo,MALLOC_CAP_DEFAULT);
  r+="
DRAM Total:	" + String(heap_caps_get_total_size(MALLOC_CAP_DEFAULT) / 1024) + " Kb
\n";
  // Three ways to get the same thing
  r+="
DRAM Free now:	" +
    String(heapInfo.total_free_bytes / 1024) + " Kb
" +
    String(esp_get_free_heap_size() / 1024) + " Kb
" +
    String(heap_caps_get_free_size(MALLOC_CAP_8BIT) / 1024) + " Kb
\n";
  r+="
DRAM Free Lowest Achieved:	" +
    String(esp_get_minimum_free_heap_size() / 1024) + " Kb
" +
    String(heapInfo.minimum_free_bytes / 1024) + " Kb
\n";

  heap_caps_get_info(&heapInfo,MALLOC_CAP_INTERNAL);
  r+="
Total Heap:	" + String(heapInfo.total_free_bytes / 1024) + " Kb
\n";
  r+="
Free internal heap size:	" + String(esp_get_free_internal_heap_size() / 1024) + " Kb
\n";
  r+="
Free Internal Lowest Achieved:	" + String(heapInfo.minimum_free_bytes / 1024) + " Kb
\n";

  heap_caps_get_info(&heapInfo,MALLOC_CAP_EXEC);
  r+="
IRAM-Capable (exec)	" + String(heapInfo.total_free_bytes / 1024) + " Kb
\n";
  r+="
Free Exec Lowest Achieved:	" + String(heapInfo.minimum_free_bytes / 1024) + " Kb
\n";

I've not used SPI RAM.  I believe there are specific things you need to do to enable it for use within your sketch.  Otherwise, I'm not sure how the heap knows it can be used (if indeed SPI RAM can be used by the heap).

I am about to deploy an initial solution.  The issue is a follows:  IF you have PSRAM (aka SPIRAM), the Espressif IDF will automatically detect and use.  However, the IDF determines whether to allocate memory to the PSRAM or whether to use RAM.  It will generally use RAM first, unless there is no more RAM, or a specific allocation is above a certain size.  This size is programmed into the IDF as 16K, so it can't be changed when using the Arduino-ESP32 board manager.  Hence, when using regular malloc() you lose control of which RAM is used.
Fortunately, you CAN force SPIRAM to be used by adding the appropriate flags to malloc(), or by simply using ps_malloc().  But not everything works when stored in PSRAM - some things need to be stored exclusively in internal RAM.  None of the HomeSpan components need to be stored in RAM, so there is a lot we can save by moving HomeSpan-specific malloc() calls and containers (like vectors) to use PSRAM whenever available.
Changing malloc() to ps_alloc() where used in HomeSpan is easy.  Getting vectors and other containers to use PSRAM is a little trickier and requires creating a custom allocator, which I did.  I now have a version that maximizes the use of PSRAM.
Unfortunately, the Espressif's ps_malloc() returns a NULL if you try to use it when there is PSRAM.  I do not know why they did not code it so that is defaults back to RAM.  To address this I added code that checks for the macro BOARD_HAS_PSRAM, and I defined two new macros HS_MALLOC and HS_CALLOC.  If BOARD_HAS_PSRAM is defined, then HS_MALLOC and HS_CALLOC are defined as ps_malloc() and ps_calloc() for use everywhere in HomeSpan, including in the custom allocators used for vectors.  If BOARD_HAS_PSRAM is not defined, then HS_MALLOC and HS_CALLOC are defined as malloc() and calloc() everywhere.
I will update 1.8.1-dev shortly so you can test this out.  From the Arduino IDE you can enable/disable PSRAM and see exactly how it works.  I also added PSRAM heap output to the 'm' Serial Command so you can track it.
A few other caveats:
User-sketches typical use new everywhere.  But new uses malloc(), which means if you have a lot of Accessories, you can still fill up the internal RAM.  There is a way of forcing new to use a pre-allocated pointer by adding that pointer as an argument to new like this new(* myPointer) Characteristic::On().  But to use this myPointer needs to first reserve memory.  Though the syntax is a little complex, this is easily done using the HS_MALLOC macro.
In the new 1.8.1-dev update you will how this is done in a sketch.  I have some ideas of another easier-to-use macro that I'll be adding later this week.
Using an ESP32-S2 with 8MB of PSRAM I have successfully run a bridge with 149 Lightbulb Accessories supporting on/off and brightness (though I think the current sketch is coded for just 80).
There is still some more optimization to be done - I need to go back to the Web Log code and see if there are more streamlined ways to use the memory (there should be).  Also, one of the containers I use in HomeSpan to track certain adhoc HomeKit data (unordered_map) needs a more complicated custom allocator, which I have yet to deploy.
In sum, there are three memory-projects going on:

Ensure PSRAM is used optimally whenever available - this ensures there is enough internal RAM left for Espressif functions (like WiFi connectivity, etc.) that likely cannot be placed in PSRAM.
Minimize wasted FIXED memory across all of HomeSpan.  By fixed I mean memory that is somewhat independent of the number of Accessories.
Minimize memory usage that scales with the number of Accessories (@mgeramb has been focusing on this as well).

A somewhat related memory issue if NVS storage, as used to retain the state of Characteristics.  The 'm' command now track this and HomeSpan warns if you are using too much (WiFi needs a lot of NVS so we can't use all of the NVS for Characteristics).  However, you can easily expand NVS by specifying a larger NVS Partition.  The Arduino-ESP32 board manager fortunately allows you to create a custom partition definition by adding it to your sketch folder.  I will build one and provide as an option component to download so users can expand the NVS if needed.
In the interim, please give the 1.8.1-dev update a try and let me know how it works.

So far, 8268e519dd7dbf6753daa45cc5b778ec6f3c59ce compiles and run! Lets see if it last 24 hours. Btw, version 1.8.1-dev seems to have become stabble for a while. A mix of your updates & Arduino-ESP 2.0.14 with their WiFi fix probably helps. I don't see any WiFi disconnects like I used to.
I have a total of 14 accessories + 1 which acts as the bridge, and each of these have different Characteristics. I will look into trying out that HS_ALLOC macro.
Thanks for the quick turnaround btw!

So it frees' up internal RAM ( MALLOC_CAP_INTERNAL ) to use SPIRAM by ~10Kb, but I don't understand why DRAM would have gone lower by ~6Kb overall. No big deal anyway given the higher amount of DRAM available.
For rows with multiple values I am using different methods to get the memory values. This tests the different options to get memory metrics.

Standard
Using HS_MALLOC

DRAM (total):
4365 Kb4346 Kb
4365 Kb4346 Kb

DRAM (free):
4209 Kb4209 Kb4209 Kb
4209 Kb4209 Kb4209 Kb

DRAM (lowest):
4201 Kb4201 Kb❓4201 Kb
4194 Kb4194 Kb❓4194 Kb

Internal (total):
305 Kb290 Kb
305 Kb292 Kb

Internal (free):
155 Kb191 Kb
164 Kb✅200 Kb

Internal (lowest):
187 Kb
190 Kb✅

Exec (total):
161 Kb159 Kb
161 Kb159 Kb

Exec (free):
159 Kb
159 Kb

Exec (lowest):
159 Kb
159 Kb

SPI RAM (total):
4095 Kb4090 Kb
4095 Kb4089 Kb

SPI RAM (free):
4053 Kb
4043 Kb✅

SPI RAM (lowest):
4049 Kb
4039 Kb✅

The lowest is not always reliable depending on what processes you are running (see the ESP docs for why).  When running my own tests I begin by deleting WiFi network for HomeSpan.  This ensures there are no background processes running and I can compare like-for-like at each reboot.
There are a few additional places I found that needed to be updated (I forgot to replace realloc() calls).  I also added new macro called ps_new() that makes it easier to replace new in your sketches.  Changes are checked into the 1.8.1-dev as usual.
Regarding the WebLog, I will be making some changes to reduce total memory used when there are very large outputs (i.e. lots of weblog records).

I found and addressed the problem that was limiting the number of weblog entries from proper transmission.  The issue was that the HTML response String was growing too large and eating all the heap memory.  Solution was to transmit response String in smaller chunks so that it never grows more then a fixed amount no matter how many weblog entries are transmitted.  Tested successfully with 500 entries.  Code is updated in 1.8.1-dev.

Something went wrong... unsure if related...
************************************************************
Welcome to HomeSpan!
Apple HomeKit for the Espressif ESP-32 WROOM and Arduino IDE
************************************************************

** Please ensure serial monitor is set to transmit <newlines>

Message Logs:     Level 0
Status LED:       Pin 5
Device Control:   Pin 13
Sketch Version:   dscHome v0.10 - Nov 22 2023 08:49:32
HomeSpan Version: 1.8.1
Arduino-ESP Ver.: 2.0.14
ESP-IDF Version:  4.4.6
ESP32 Chip:       ESP32-D0WD-V3 Rev 3 dual-core 4MB Flash
ESP32 Board:      esp32
PWM Resources:    16 channels, 8 timers, max 20-bit duty resolution
Sodium Version:   1.0.12-idf  Lib 9.4
MbedTLS Version:  mbed TLS 2.28.4
Sketch Compiled:  Nov 22 2023 08:49:43
Partition:        app1
MAC Address:      E8:31:CD:C7:0E:4C

Device Name:      Système d'alarme

assert failed: block_locate_free heap_tlsf.c:441 (block_size(block) >= size)

Backtrace: 0x400844a1:0x3ffb1f90 0x4008fba5:0x3ffb1fb0 0x40095709:0x3ffb1fd0 0x40094b5e:0x3ffb2100 0x40095223:0x3ffb2120 0x40095360:0x3ffb2140 0x40084964:0x3ffb2160 0x40084979:0x3ffb2190 0x400e9bbd:0x3ffb21b0 0x400dd3f1:0x3ffb21d0 0x400dd4f5:0x3ffb2200 0x400d64df:0x3ffb2230 0x400ea7ae:0x3ffb2290
0x400844a1: _xt_panic at C:/Users/<hidden>/esp/esp-idf/components/esp_system/port/arch/xtensa/panic_handler_asm.S:45

0x40084964: rtc_clk_32k_enable at C:/Users/<hidden>/esp/esp-idf/components/esp_hw_support/port/esp32/rtc_clk.c:87

0x40084979: clk_ll_xtal32k_disable at C:/Users/<hidden>/esp/esp-idf/components/hal/esp32/include/hal/clk_tree_ll.h:250
 (inlined by) rtc_clk_32k_enable at C:/Users/<hidden>/esp/esp-idf/components/esp_hw_support/port/esp32/rtc_clk.c:91

0x400dd3f1: _vfprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfprintf.c:1755

0x400dd4f5: _vfprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfprintf.c:1771

0x400d64df: rtcio_ll_pulldown_enable at C:/Users/<hidden>/esp/esp-idf/components/hal/esp32/include/hal/rtc_io_ll.h:193

ELF file SHA256: 6d97f492d8e309bf
Warning: checksum mismatch between flashed and built applications. Checksum of built application is 0edd153aa1c2d186dfffe820b39679566f85df4bcaeb93dec2b0889fd1e41755

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
0x40080400: _init at ??:?

entry 0x400805f0

Catching up on your past commits. The use of HS_MALLOC and ps_new is no longer required, right? I was trying to figure out what went wrong when using ps_new then I saw 9e3f6c8303a159c4f7ca5a7bdade66e2ed37a839.
So can I assume everything will now be transparent to the users, and no need to use HS proprietary methods to leverage SPIRAM?
If so, this is awesome!
And I'm running release-1.8.1-dev at ead05d8690f128755857861a53ca7cee2acd55a0, and I don't see the crash/reboots I previously saw, so things are looking good.
And thanks for the constants, I will give them a try soon.

Yes, that's correct - no need to use HS_MALLOC or ps_new (though I kept the macro in the code in case I find a future use for it).  The trick was to override the "new" command for SpanAccessory, SpanService, and SpanCharacteristic.  Whenever these, or any classes derived from these, are constructed, HomeSpan will call a custom constructor that itself uses HS_MALLOC, which in turn uses PSRAM or RAM depending on whether the device has PSRAM.  Note in the Arduino IDE there is an option to enable/disable PSRAM, so you the differences in memory usage when typing the 'm' command.
The only other limiting factor is the size of the NVS storage.  If you have a lot of Accessories each with a lot of Characteristics, AND you set the Characteristics to store their values in NVS, you can run out of NVS space.  In default partition schemes there is room for about 504 NVS records, of which 150 or so are used by WiFi (part of the IDF itself).  I changed the NVS storage scheme so that the values of most Characteristics are now stored in a single NVS record, instead of 3 records, which saves a lot of space.  Still, it is possible to run out.  The solution is to change the partition table and expand NVS.
Fortunately, the Arduino-ESP32 library allows you to specify a custom partition table in the sketch directly.  If found, it uses it to create the partitions when loading the sketch.  The IDE does not indicate it is using a custom partition when compiling, but I can confirm that it is.  I have added a new example, MaxAccessories, that includes a custom partition table.  The example is still a work in progress so not yet finished.
Re the constants, one of the tricky part is to figure out a good naming convention, so curious if you find the names easy-to-use.  As part of the next release I will need to expand the documentation for HomeSpan to include all these constants in an automated fashion.

Re the constants, one of the tricky part is to figure out a good naming convention, so curious if you find the names easy-to-use.

I will answer in #679, keep topics organized...

I think it is safe to close this isssue now. The current version of 1.8.1-dev has been quite stable.


Add foobar2000 v1.5.4

Microsoft Reviewers: Open in CodeFlow

Download links change automatically by foobar2000. Don't have any direct link from the creator site.


Unable to run --do CODE from docker images (edit: and v0.0.18)

I'm trying to run one-liners from the docker image, but it doesn't seem to work:
$ docker run --rm ghcr.io/refaktor/rye -do 'print "Hello"'
2024/04/23 15:55:38 Error reading line: EOF
Welcome to Rye console. Use ls for current or lsp or lsp\ "prin" to list parent context.
×> ⏎

If I build locally, the flag works fine:
❯ ./rye -do 'print "hello"'
hello

And if I build the docker image locally, it also works fine:
❯ docker buildx build .
[+] Building 22.0s (13/13) FINISHED        docker:default
 => [internal] load build definition from Dockerfil  0.0s
 => => transferring dockerfile: 302B                 0.0s
 => [internal] load metadata for docker.io/library/  0.0s
 => [internal] load metadata for docker.io/library/  0.4s
 => [internal] load .dockerignore                    0.0s
 => => transferring context: 61B                     0.0s
 => [builder 1/5] FROM docker.io/library/golang:1.2  0.0s
 => CACHED [bin 1/2] FROM docker.io/library/alpine:  0.0s
 => [internal] load build context                    1.0s
 => => transferring context: 119.96MB                1.0s
 => CACHED [builder 2/5] RUN apk add --no-cache git  0.0s
 => CACHED [builder 3/5] WORKDIR /go/src/rye         0.0s
 => [builder 4/5] COPY . .                           0.7s
 => [builder 5/5] RUN mkdir -p /out &&     go buil  19.5s
 => [bin 2/2] COPY --from=builder /out/rye /         0.1s
 => exporting to image                               0.1s
 => => exporting layers                              0.1s
 => => writing image sha256:bdeb5329a27f089008f9bb1  0.0s
❯ docker run --rm booniepepper/rye -do 'print "Hello"'
Hello

Actually, it looks like it may be an issue with 0.0.18 that has since been fixed
❯ git checkout v0.0.18
HEAD is now at 2b78b39 Merge branch 'main' of github.com:refaktor/rye into scriptloc

❯ go build
go: downloading golang.org/x/term v0.17.0
go: downloading golang.org/x/crypto v0.20.0
go: downloading github.com/refaktor/liner v1.2.6
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading golang.org/x/sys v0.17.0

❯ ./rye -do 'print "hello"'
Welcome to Rye console. Use ls for current or lsp or lsp\ "prin" to list parent context.
×> ^C

Yes, I've checker. v0.0.18 accepted -do flag, but only after accepting a file or dot ".", so after it loaded some file. After 18 I added option that -do flag also works with no input files. But I've made v0.0.19 release and I get this ... as I said, I rarely use Docker, so there is probably something I don't understand:
[:. Linux terminal .:] docdoc': docker run ghcr.io/refaktor/rye -do "print 123 + 123"
2024/04/24 20:09:58 open -do: no such file or directory
[:. Linux terminal .:] docker run ghcr.io/refaktor/rye:latesrye:latest -do "print 123 + 123"
2024/04/24 20:10:01 open -do: no such file or directory
[:. Linux terminal .:] docker run ghcr.io/refaktor/rye@sha256:e73d6d8a7c66dd65e578271e1fc4e625e992108b748f3103cc748dab034e6dfd -do "print 123 + 123"
246

Hmm... it seems to works for me right now
$ docker run --rm ghcr.io/refaktor/rye -do '"hello" |print'
Unable to find image 'ghcr.io/refaktor/rye:latest' locally
latest: Pulling from refaktor/rye
50967c6354e2: Pull complete
250c06f7c38e: Pull complete
01948aa61ab5: Pull complete
Digest: sha256:e73d6d8a7c66dd65e578271e1fc4e625e992108b748f3103cc748dab034e6dfd
Status: Downloaded newer image for ghcr.io/refaktor/rye:latest
hello

$ docker run --rm ghcr.io/refaktor/rye -do 'print 123 + 123'
246

Also working for me with the 0.0.19 tag explicitly:
docker run ghcr.io/refaktor/rye:0.0.19 -do 'print 123 + 123'
Unable to find image 'ghcr.io/refaktor/rye:0.0.19' locally
0.0.19: Pulling from refaktor/rye
Digest: sha256:e73d6d8a7c66dd65e578271e1fc4e625e992108b748f3103cc748dab034e6dfd
Status: Downloaded newer image for ghcr.io/refaktor/rye:0.0.19
246

I might chalk up the errors you're seeing to something like locally cached images from previous versions. Docker leaves... a lot to be cleaned up

I've managed to convince docker to update it's local copy and now it works with latest for me also. I had to use:
docker run --update always ghcr.io/refaktor/rye:latest -do "print 123 + 123"
And now it works even without --update always. Various docker image|build prune-s didn't work. So I consider this issue closed. Thanks for opening it and clearing this up.


jsdiff: Replaced phantomJS by chrome

Added Karma-chrome dependency for aarch64
Signed-off-by: ossdev07<EMAIL_ADDRESS>

Hi,
Removed phantomJS dependency from package.json.
PhantomJS is unmaintained, Remove the dependency and use headless chrome instead.
-> Reason for using --no-sandbox flag:
For aarch64 chrome binary is not present, we are using chromium binary to launch the Chrome.
Security is one of the most important goals for Chromium, and --no-sandbox flag provides that.
When trying to use chromium as root user like in docker container then only the requirement of --no-sandbox flag is coming
Without the flag, chromium gives error as root user-
[28769:28769:0925/163702.505790:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Thus, we need to give the --no-sandbox flag when we launch chrome with chromium binary.

-> Justification for change karma version
Updated the karma version to 2.0.0 because the earlier karma 0.13.11 was very old, though we can use the earlier version too.

Ping @kpdecker
Can you please have a look at this PR.
It will be great to see chrome headless support for jsdiff.


Review list of approved licenses

At the moment the licenses below (based on the allowed third party licenses document) are considered approved by the license check. It'd be good to review this list and update it as needed.
Apache-2.0
BSD-2-Clause
BSD-2-Clause-FreeBSD
BSD-3-Clause
ISC
MIT
PostgreSQL
Python-2.0
X11
Zlib

This is fine, ideally projects should be just using FOSSA, Snyk etc to scan for approved licenses (which has more indepth scanning support), but we can do a quick lint for sure!


✨Added Delta Function into FixedPointMathLib

Description
Added Absolute Delta Function. @Vectorized may be optimize more can you look this?
Checklist
Ensure you completed all of the steps below before submitting your pull request:

[x] Ran forge snapshot?
[x] Ran npm run lint?
[x] Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

Not sure if really want to add this, as it can be confused with https://mathworld.wolfram.com/DeltaFunction.html
Some other functions that can be considered https://docs.python.org/3/library/math.html

gcd
lcm
factorial

Yes. We can give rename by dist. Simply x-y overflowing on the edge case.
Example:-
dist (type(int256).min, type(int256).max) simple x-y overflows the int256 limit.
thanks for giving me an idea about some more function.


ClusterSecretStore provided via vault(kubernetes authed)cannot work  when ClusterSecretStore.spec.provider.vault.auth.kubernetes.serviceAccountRef.namespace is omited

Describe the bug
ExternalSecret cannot create when use ClusterSecretStore(vault provider and kubernetes auth)
cannot request Kubernetes service account token for service account "xxxxx": serviceaccounts "xxxx" not found
To Reproduce

Install ESO v0.10.0
Create service account (vault-secret-store-reader,in my case) in the same namespace with ESO and config vault to grant access to this service account
Create ClusterSecretStore with provider vault and kubernetes auth

and left ClusterSecretStore.spec.provider.vault.auth.kubernetes.serviceAccountRef.namespace be comment
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
  name: vault-backend
spec:
  provider:
    vault:
      server: "http://vault.hashicorp:8200"
      path: "secret"
      version: "v2"
      auth:
        kubernetes:
          mountPath: "kubernetes"
          role: "external-secret-reader"
          serviceAccountRef:
            name: "vault-secret-store-reader"
            # namespace:  cso

create external secret with above ClusterSecretStore

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: certificates-wildcard-example-com
spec:
  secretStoreRef:
    name: vault-backend
    kind: ClusterSecretStore
  refreshInterval: 1h
  target:
    name: test-cert
    creationPolicy: Owner
    template:
      type: kubernetes.io/tls
      mergePolicy: Merge
  dataFrom:
  - extract:
      key: "ssl-certs/wildcard-example-com"

apply above ExternalSecret yaml to different namespace. external secrets only synced success in serviceAccount's namespace  cso

#  kubectl get externalsecrets.external-secrets.io -A
cso         certificates-wildcard-example-com   vault-backend   1h                SecretSynced            True
test1       certificates-wildcard-example-com   vault-backend   1h                SecretSyncedError    False
test2      certificates-wildcard-example-com    vault-backend   1h                SecretSyncedError    False

for test1 and test2 namespace got error
cannot request Kubernetes service account token for service account "vault-secret-store-reader": serviceaccounts "vault-secret-store-reader" not found
Expected behavior
extenal secrt create success in all namespace
Additional context
After uncomment ClusterSecretStore.spec.provider.vault.auth.kubernetes.serviceAccountRef.namespace to explicitly set service account's namespace. all ExternalSecret Create Success.
As documents described: The ClusterSecretStore is a cluster scoped SecretStore that can be referenced by all ExternalSecrets from all namespaces. Use it to offer a central gateway to your secret backend. ,the same  ClusterStore should behave exactly the same in different namespace

hi @calmzhu . This is intended. If oyu dont provide a namespace, you are referring the authentication to the namespace of the externalSecret object. In this case, you need to have a service account per namespace.
if you want to allow the same access for all ExternalSecrets, adding the namespace is mandatory


Options for working with wsl paths?

I have a WSL2 image mapped to a local drive via the \\wsl$ share.
It appears that repoz ignores non-fixed drives (which makes sense as a default)
Would it be possible to allow tracking repos through this mount?
I could attempt a fix if you think it's a good idea.
I see several options to accomplish this:

Allow any network share that points at \\wsl$
Option to allow user-specified network drives
Option to allow watching all network drives.

Understood.
You're absolutely right about the fixed drives. I don't think the all-or-nothing-choice to watch all network drives would be a good option.
However, I think that it might be convenient if RepoZ showed an UI with all the drives available. By default RepoZ checks and tracks the fixed ones:
[x] C: System (fixed)
[x] D: Data (fixed)
[ ] E: DVD (removble)
[ ] \\wsl... (network)
[ ] S: Synology Home (network)

Do you want to add a feature like this?

Understood.
You're absolutely right about the fixed drives. I don't think the all-or-nothing-choice to watch all network drives would be a good option.
However, I think that it might be convenient if RepoZ showed an UI with all the drives available. By default RepoZ checks and tracks the fixed ones:
[x] C: System (fixed)
[x] D: Data (fixed)
[ ] E: DVD (removble)
[ ] \\wsl... (network)
[ ] S: Synology Home (network)

Do you want to add a feature like this?

Sure, I'm happy to attempt it.
I'll see if I can make it work as a new option in the hamburger menu.

Sure, I'm happy to attempt it.
I'll see if I can make it work as a new option in the hamburger menu.


Create Python-Reverse-Word-and-Swap-Cases.py

Hi @FerreiraWalter , Thanks for the pull request! 😄
Just change the filename to reflect proper camecasing, and remove the word Python as I doubt included in problem name.


Examples of proposed FHIR structure for Global.HealthxISARIC

@sadiekelly this is where I'm going to be storing the proposed FHIR table structures - just Patient in here at the moment but you get the idea.

@sadiekelly this is where I'm going to be storing the proposed FHIR table structures - just Patient in here at the moment but you get the idea.

@pipliggins sorry for the delay - I've added a few comments to some of the examples now. I haven't looked too much at condition as this comes from the SDTM SA domain which I have not yet accessed.


[T3A2][W15-A1] Mamtha

CHange public to private

Encapsulation is done correctly.
Please set up the tab character as 4 spaces in Eclipse for consistency purpose (instead of 8 spaces or hard tab character).


Rename "whitelist" to "allowlist"

I suggest to rename the parameter "Whitelist" to the more neutral "Allowlist"

👍


My description as set as title

all works fines,
login, upload, thumbnail, title,
but few time after my title are set, my description overwrite it
anyone know how to fix this ?

Change below if video_description:
# description_container = self.browser.find(By.XPATH, Constant.DESCRIPTION_CONTAINER)
description_field = self.browser.find_all(By.ID, Constant.TEXTBOX)[1]
# print(len(description_field))
# for each_t in description_field:
#     print(each_t)
# description_field = self.browser.find(By.ID, Constant.TEXTBOX, element=description_container)

Change below if video_description:
# description_container = self.browser.find(By.XPATH, Constant.DESCRIPTION_CONTAINER)
description_field = self.browser.find_all(By.ID, Constant.TEXTBOX)[1]
# print(len(description_field))
# for each_t in description_field:
#     print(each_t)
# description_field = self.browser.find(By.ID, Constant.TEXTBOX, element=description_container)

thx mate

Change below if video_description:
# description_container = self.browser.find(By.XPATH, Constant.DESCRIPTION_CONTAINER)
description_field = self.browser.find_all(By.ID, Constant.TEXTBOX)[1]
# print(len(description_field))
# for each_t in description_field:
#     print(each_t)
# description_field = self.browser.find(By.ID, Constant.TEXTBOX, element=description_container)

I cloned your branch and i am getting this error.

I had same error with master branch too. Close up:

No, you've note copied my code properly. You've to comment out those parts which i did. That means copy the code i provided as it is, don't remove hash or anything else.


Add cilium to conformance testing

Please add Cilium into knative's testing of the gatewayapi.
Cilium is a CNI, kube-proxy replacement, sidecar-less service mesh, load balancer, and observability tool that also offers a gateway controller.  Cilium 1.15 will support all gateway-api features except for one as seen in their conformance report, https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/reports/v0.8.1/cilium-cilium.yaml.
Cilium is growing in popularity and leverages some of the most recent Linux features.  Greatly appreciate if it could be added and regularly tested against Knative!

Happy to help out with the implementation of this! We're looking to use Cilium for Gateway API and it feels like the best way to make it work with Knative.

hey @tomaszkiewicz, thanks for opening the filters issue.  I have that working but not sure how to configure the rest of this project to work with Cilium.  Would you happen to have an example of how you setup Knative?
I had kourier ingress working, but not understanding how to get the gateway setup functioning.  If anyone has any working examples that would be great!
my setup:  https://github.com/acelinkio/argocd-homelab/blob/main/manifest/knative-serving.yaml

Hi, sure: I simply followed a readme on this repository to deploy both KNative as well as all the settings, then fine tuned some of them in config-gateway config map:
 visibility: |
   ExternalIP:
     class: cilium
     gateway: default/cilium-gateway
     service: default/cilium-gateway-cilium-gateway
   ClusterLocal:
     class: cilium
     gateway: default/cilium-gateway
     service: default/cilium-gateway-cilium-gateway

Then I created a gateway object like that:
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
  name: cilium-gateway
spec:
  gatewayClassName: cilium
  listeners:
    - protocol: HTTP
      port: 80
      name: web

Hey @tomaszkiewicz ,
I have Cilium/Knative working!  However was wondering if you found a way to do path based routing to a Knative service.? ie, /api/v1 -> microservice1.  /api/v2/ -> microservice2
There is minimal flexibility on the HTTPRoutes that the net-gateway-api creates.

I doubt it's possible in the current version...

if you found a way to do path based routing to a Knative service.? ie, /api/v1 -> microservice1. /api/v2/ -> microservice2

We have examples with Istio where you route the external gateway traffic to the internal gateway based on paths and rewrite the host header
See: https://github.com/knative/docs/blob/main/code-samples/serving/knative-routing-go/routing.yaml
I'm going to mark these comments off topic - feel free to open an new issue regarding this in here or in knative/serving repo

Depends on https://github.com/knative-extensions/net-gateway-api/issues/621

https://github.com/cilium/cilium/issues/29080 has been closed/merged, what does this mean for this issue?


Segmentation fault(Core Dump)

Hi, I encountered a problem of "Segmentation fault(Core Dump)" when I run "inference.py" with python 2.7.

Hi, have you successfully installed the osmesa according to osmesa/osmesa.md ?

yes

Can you pass the test in osmesa.md?

I have installed osmesa with the introduction of  osmesa/osmesa.md and run "python test.py" successfully

can you copy and show the logs?

OK, I will copy and show the logs later. Thank you for the immediately replay!

cvlab@cvlab:~/2018-2019/Program/holistic_scene_parsing-master/holistic_scene_parsing-master/osmesa-master$ python test.py
Depth=16 Stencil=0 Accum=0
all done

cvlab@cvlab:~/2018-2019/Program/holistic_scene_parsing-master/holistic_scene_parsing-master$ python inference.py -lo 11
infer 3D room layout and 3D object for sample 11
Segmentation fault (core dumped)

Hi,
The bug may be caused by the different version of scikit-learn.
You could downgrade the scikit-learn to 0.19.0 by 'pip install scikit-learn==0.19.0'.

Thank you very much for your reply. I will have a try.
Best regards.
sincerely,
Junxiao
SiyuanHuang<EMAIL_ADDRESS>于2018年11月27日周二 下午5:45写道：

Hi,
The bug may be caused by the different version of scikit-learn.
You could downgrade the scikit-learn to 0.19.0 by 'pip install
scikit-learn==0.19.0'.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/thusiyuan/holistic_scene_parsing/issues/3#issuecomment-442286803,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AqYvGgJP_klOf3TjtIUA35yg08PyBy33ks5uzeqygaJpZM4YMjU6
.

--
School of Software,
Zhengzhou University.
Zhengzhou, Henan 450001
P. R. China
<EMAIL_ADDRESS>

The code running successfully. Thank you for your kindly help!

Hi, I ran into this exact same problem but had some further trouble. At first I had the exact same segmentation fault error, and downgrading scikit-learn allowed some of the code to run, however I now still get a segmentation fault error after part of the code runs (see screenshot).
I've successfully installed and tested osmesa, using version 18.0.0 of mesa. The last print statement comes from line 120 of inference.py, but I'm really not sure what could be causing the segmentation fault. I am running this on windows using a Linux virtual box, but the virtual box has 50G of memory and only 27G is used, and the CPU power never reaches 100% when running the code, so I think that should be fine.
Any help would be very appreciated!

Hi, I ran into this exact same problem but had some further trouble. At first I had the exact same segmentation fault error, and downgrading scikit-learn allowed some of the code to run, however I now still get a segmentation fault error after part of the code runs (see screenshot).
I've successfully installed and tested osmesa, using version 18.0.0 of mesa. The last print statement comes from line 120 of inference.py, but I'm really not sure what could be causing the segmentation fault. I am running this on windows using a Linux virtual box, but the virtual box has 50G of memory and only 27G is used, and the CPU power never reaches 100% when running the code, so I think that should be fine.
Any help would be very appreciated!

Did you find any solution for this?
Thanks


Unable to apply constraint 'strict' to schema of type 'union'

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
Hi, I am trying to use a union type with strict=False in my schema and am not sure what the recommended workflow is.
I have the following model:
from pydantic import BaseModel, ConfigDict, Field, Strict, field_validator
from typing_extensions import Annotated

class MyBaseModel(BaseModel):
    model_config = ConfigDict(strict=True)

class Model1(MyBaseModel):
    a: int | tuple[int, int] = Field(default=(1, 2))

Now it can happen that a is passed as a list instead of a tuple. I usually handle this with:
class Model2(MyBaseModel):
    a: int | tuple[int, int] = Field(default=(1, 2), strict=False)

But this raises RuntimeError: Unable to apply constraint 'strict' to schema of type 'union'
Only annotating the tuple doesn't work either:
class Model3(MyBaseModel):
    a: int | Annotated[tuple[int, int], Strict(False)] = Field(default=(1, 2))

Model3(a=[1, 2])

This raises:
pydantic_core._pydantic_core.ValidationError: 2 validation errors for Model3
a.int
  Input should be a valid integer [type=int_type, input_value=[1, 2], input_type=list]
    For further information visit https://errors.pydantic.dev/2.9/v/int_type
a.tuple[int, int]
  Input should be a valid tuple [type=tuple_type, input_value=[1, 2], input_type=list]
    For further information visit https://errors.pydantic.dev/2.9/v/tuple_type

So my current workaround is to add a field_validator but this is cumbersome:
class Model4(MyBaseModel):
    a: int | tuple[int, int] = Field(default=(1, 2))

    @field_validator("a", mode="before")
    @classmethod
    def transform_a(cls, v) -> int | tuple[int, int]:
        if isinstance(v, list):
            return tuple(v)
        return v

Model4(a=[1, 2])

What is confusing to me is that setting strict=False in the base config works without error:
class MyBaseModel(BaseModel):
    model_config = ConfigDict(strict=False)

class Model1(MyBaseModel):
    a: int | tuple[int, int] = Field(default=(1, 2))

Model1(a=[1, 2])

Example Code
No response
Python, Pydantic & OS Version
pydantic version: 2.9.2
        pydantic-core version: 2.23.4
          pydantic-core build: profile=release pgo=false
               python version: 3.12.4 (main, Jun  6 2024, 18:26:44) [Clang 15.0.0 (clang-15<IP_ADDRESS>.5)]
                     platform: macOS-13.6.6-arm64-arm-64bit
             related packages: mypy-1.11.2 typing_extensions-4.12.2
                       commit: unknown

@guarin,
Thanks for reporting this. Definitely looks like a bug. Will add to our Union Issues milestone 👍


uhppoted-tunnel event connector

Implement an events connector.
The existing udp-listen connector can be used to rebroadcast events but unnecessarily expects a reply that will never come.

Feature complete - pending release v0.8.4


can not to move next year

Version of flutter_calendar_carousel
Expected behavior
I try to move to next month of next  year  but It's stop at Jan 2020
Actual behavior
I want to move next month
flutter doctor result (run flutter doctor in terminal)
Steps to reproduce the behavior

Please provide minimal reproduction~! How would you like to change the year?

i want to listen year and month when i tap next or previous key


Avoid overflow in get_matching_group_value.

We use 32bit indices to access baseline hash tables, but its actual size might be over 4GB, so we shouldn't use 32bit offset values to access it. With this fix, we can successfully execute H2O GroupBy Q10 on a big dataset requiring a 2 billion entries baseline hash table.

Cuda has its own get_matching_group_value implementation that also uses uint32_t for offsets.  We probably need to modify them as well.

I looked into get_matching_group_value_columnar_slot but didn't see any operation that might overflow. For CUDA, we don't allocate hash tables >2GB. I'm not sure it's relevant for CUDA, because the offset is not in bytes, it's in sizeof(int64_t), so you need at least 32GB hash table to overflow. Do we have such big ones on CUDA?


Rollbacks with image policy?

Hey All--just deployed fluxv2 to our dev cluster and am SUPER excited about it! BIG improvement, and the last version served us so well, we cant wait to see the things about the new version we have not even unlocked.
I was playing around with the ImagePolicy, and wondered how you would do rollbacks in the event of a big issue if the policy only works on incrementing semver versions.
For example, I have this policy:
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImagePolicy
metadata:
  name: my-image
  namespace: flux-system
spec:
  filterTags:
    extract: $1
    pattern: ^dev-v(.*)
  imageRepositoryRef:
    name: my-image
  policy:
    semver:
      range: 2.x.x-0

The image tag we are using is dev-v2.x.x-<build-id>.  Doing it this way allows us to simply re-tag an image with stg and the staging cluster picks it up and deploys automatically (same for prod when we promote).  This currently works with our expected workflow, but what happens when we need to roll back?
Say we have just deployed v2.31.0-34 and now we need a way to re-deploy v2.29.3-33.  Is there any way to do this or is it on the roadmap? Or is the expected path that we would just create a patch and create v2.31.1-35?  That would be particularly difficult in the case of a rollback, as we would need to revert the commit in our git repo versus just trigger a CI job that rebuilds a particular tag (or better yet, find a way to tell flux to grab an old image temporarily).
Any thoughts around this?
Thanks so much in advance!

Please read the docs https://toolkit.fluxcd.io/guides/image-update/#revert-image-updates

If it's an urgent matter you can also consider updating the resource manifest directly overriding the image tag manually to the desired value and temporarily removing the marker # {"$imagepolicy": "policy-name"}.

I think it's worth considering a pinning mechanism: https://github.com/fluxcd/image-reflector-controller/issues/117

Thanks @stefanprodan I was just coming in here to close this out as I found this in the docs this morning.  My apologies! Lots to read through but I appreciate how thorough they are.


C style / JS style sexy comments

Right now, if I start with a block of text like this:
Comment headline

Iriure feugait amet, autem aliquip et ut, accumsan ea te duis facilisi illum dolore

and then apply the NERDComSexyComments command it ends up looking like this:
/*
 *Comment headline
 *
 *Iriure feugait amet, autem aliquip et ut, accumsan ea te duis facilisi illum dolore
 */

I'd like to figure out a way to wrap this text in C++ Style comment blocks comment block. So that the text would look like this.
/**
 * Comment headline
 *
 * Iriure feugait amet, autem aliquip et ut, accumsan ea te duis facilisi illum dolore
 */

Notice the two leading asterisks and the spaces after the next line asterisks that aren't immediately followed by a line break.
Would you be amenable to this change for NERDComSexyComments, or should this get broken out into another command?

+1 - This matches standard PHP commenting as well.

This seems to be a duplicate of #125. I've suggested a possible solution there. If that isn't enough, please drop a comment there about what needs improving and I'll re-open it for discussion there. Thanks for the report!


Changed WindowsTargetPlatformVersion to $(LatestTargetPlatformVersion)

Changed WindowsTargetPlatformVersion to $(LatestTargetPlatformVersion) in all instances where it was hardcoded.
Signed-off-by: Rob Scheepens<EMAIL_ADDRESS>

@rob-scheepens build is failing, please check the logs.
Thanks,
Yan.

@rob-scheepens build is failing, please check the logs.
Thanks,
Yan.

Failed build:
20>c:\program files (x86)\windows kits\8.1\include\um\combaseapi.h(229): error C2760: syntax error: unexpected token 'identifier', expected 'type specifier'
20>Done building project "viorngtest.vcxproj" -- FAILED.

Looks like this only failed for Vista. For now, I am only focusing on Win8.1 and Win10, as a precursor to potentially splitting out legacy ( =<Win7) and modern ( >=Win8).
@YanVugenfirer can you retest with only Win8/8.1/10?

Closing.
All eWDK related issues are addressed in PR#569.


Difference between HKT<URI, A> and Type<URI, A>

Do you want to request a feature or report a bug?
None of the above. It's only a question.
What is the question?
I would like to know how to use HKT.ts. My use case is the following:
// I have already done module augmentation on `Observable` and `Promise` to add _URI and _A,
// as well as module augmentation on './HKT.ts' to fill the `URI2HKT` mapping
// So `URIS` contains now `'Observable' | 'Promise'`

abstract class MyClass<URI extends URIS>{
  abstract run(): HKT<URI, number>;
}

// concrete classes
class MyObservableClass extends MyClass<'Observable'> {
  run(): Observable<number> {
    return of(2);
  }
}

class MyPromiseClass extends MyClass<'Promise'> {
  run(): Promise<number> {
    return Promise.resolve(2);
  }
}

My question comes from the abstract run(): HKT<URI, number>;, should it be
abstract run(): Type<URI, number>;

? I feel those 2 are interchangeable.
IIRC there was a HKT.md file that explained this, but I can't seem to find it anymore.
Additional Comments
Have you considered creating a fp-ts Gitter/Slack/Spectrum for questions like this? I was looking for such a platform, not to pollute this issue tracker, but didn't find one.

IIRC there was a HKT.md file that explained this, but I can't seem to find it anymore.

Here it is: https://gcanti.github.io/fp-ts/recipes/HKT

I have already done module augmentation on Observable and Promise to add _URI and _A,
as well as module augmentation on './HKT.ts' to fill the URI2HKT mapping
So URIS contains now 'Observable' | 'Promise'

Actually the module augmentation on HKT.ts should be sufficient now.

I feel those 2 are interchangeable

AFAIK that's because you also augmented Observable and Promise with _URI and _A.
If you don't do that, you must use Type.
Repro:
import { Type, URIS } from 'fp-ts/lib/HKT'
import { Observable, of } from 'rxjs'

declare module 'fp-ts/lib/HKT' {
  interface URI2HKT {
    Observable: Observable
    Promise: Promise
  }
}

abstract class MyClass<URI extends URIS> {
  abstract run(): Type<URI, number>
}

class MyObservableClass implements MyClass<'Observable'> {
  run(): Observable<number> {
    return of(2)
  }
}

class MyPromiseClass extends MyClass<'Promise'> {
  run(): Promise<number> {
    return Promise.resolve(2)
  }
}

Got it.


Inputs' Table

The format of the Inputs' Table is broken. Causing problems with the display.

hi @jmino I think this is fixed now, thanks for pointing out. ok to close @antonbabenko


Fix header file loading error

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@tao8687 Thank you for your contribution, please sign the ca first!

@daohu527 Already signed.


⚠ Bofrost.at has degraded performance

In af4c0b0, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2284 ms

Resolved: Bofrost.at performance has improved in e1564f3 after 6 minutes.


Add python3.12 support

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

Comparison is base (4e441e5) 92.97% compared to head (bc9c95e) 92.97%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #58   +/-   ##
=======================================
  Coverage   92.97%   92.97%
=======================================
  Files           4        4
  Lines         370      370
  Branches       56       56
=======================================
  Hits          344      344
  Misses         18       18
  Partials        8        8

Flag
Coverage Δ

unittests
92.97% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


County Names for Score #188

Work for https://github.com/usds/justice40-tool/issues/188

@lucasmbrown-usds ready for review.

TODO (after meeting with Engineering)

[ ] - Rename ETL to Score Post Processing - take care of different score output files
[ ] - Comb through and use 2010 info for everything
[ ] - Add optimizations mentioned on #302
[ ] - After this PR tackle #333
[ ] - Clean up per state generation of files (we now use tilejoin with the whole us)
[ ] - Create a ticket to rewrite the local version of mbtiles/mvt generate py so that the Lambda function uses it and users can generate them locally without relying on the GeoPlatform provided US mbtile


["invalid input.  Request not processed. "] error on curl command

I've followed the sample instructions and everything worked OK until executing the curl command verification step.
curl -d '{"name":"Jane"}' -X POST https://s7ie578tq4.execute-api.us-west-2.amazonaws.com/Prod/s3-select-demo
["invalid input.  Request not processed. "]
Verbose output follows:
curl -d '{"name":"Jane"}' -X POST https://s7ie578tq4.execute-api.us-west-2.amazonaws.com/Prod/s3-select-demo --verbose
Note: Unnecessary use of -X or --request, POST is already inferred.

Trying <IP_ADDRESS>...
TCP_NODELAY set
Connected to s7ie578tq4.execute-api.us-west-2.amazonaws.com (<IP_ADDRESS>) port 443 (#0)
ALPN, offering h2
ALPN, offering http/1.1
successfully set certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
(304) (OUT), TLS handshake, Client hello (1):
(304) (IN), TLS handshake, Server hello (2):
(304) (IN), TLS Unknown, Certificate Status (22):
(304) (IN), TLS handshake, Unknown (8):
(304) (IN), TLS Unknown, Certificate Status (22):
(304) (IN), TLS handshake, Certificate (11):
(304) (IN), TLS Unknown, Certificate Status (22):
(304) (IN), TLS handshake, CERT verify (15):
(304) (IN), TLS Unknown, Certificate Status (22):
(304) (IN), TLS handshake, Finished (20):
(304) (OUT), TLS change cipher, Client hello (1):
(304) (OUT), TLS Unknown, Certificate Status (22):
(304) (OUT), TLS handshake, Finished (20):
SSL connection using unknown / TLS_AES_128_GCM_SHA256
ALPN, server accepted to use h2
Server certificate:
subject: CN=*.execute-api.us-west-2.amazonaws.com
start date: Oct 24 00:00:00 2020 GMT
expire date: Nov 23 23:59:59 2021 GMT
subjectAltName: host "s7ie578tq4.execute-api.us-west-2.amazonaws.com" matched cert's "*.execute-api.us-west-2.amazonaws.com"
issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
SSL certificate verify ok.
Using HTTP2, server supports multi-use
Connection state changed (HTTP/2 confirmed)
Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
(304) (OUT), TLS Unknown, Unknown (23):
(304) (OUT), TLS Unknown, Unknown (23):
(304) (OUT), TLS Unknown, Unknown (23):
Using Stream ID: 1 (easy handle 0x7fffd838e580)
(304) (OUT), TLS Unknown, Unknown (23):

POST /Prod/s3-select-demo HTTP/2
Host: s7ie578tq4.execute-api.us-west-2.amazonaws.com
User-Agent: curl/7.58.0
Accept: /
Content-Length: 15
Content-Type: application/x-www-form-urlencoded

(304) (OUT), TLS Unknown, Unknown (23):
We are completely uploaded and fine
(304) (IN), TLS Unknown, Unknown (23):
Connection state changed (MAX_CONCURRENT_STREAMS updated)!
(304) (OUT), TLS Unknown, Unknown (23):
(304) (IN), TLS Unknown, Unknown (23):
(304) (IN), TLS Unknown, Unknown (23):
< HTTP/2 200
< content-type: application/json
< content-length: 43
< date: Fri, 05 Feb 2021 19:41:10 GMT
< x-amzn-requestid: 32cb354a-d67a-4b56-b127-4ced637c09f8
< x-amz-apigw-id: aSXVcGjzvHcFUoQ=
< x-powered-by: AWS API Gateway & Lambda Serverless
< x-amzn-trace-id: Root=1-601d9f55-14b025925b1f8fd112b1953c;Sampled=0
< x-cache: Miss from cloudfront
< via: 1.1 802eebfb6e9ab6bda66a7156bc7add93.cloudfront.net (CloudFront)
< x-amz-cf-pop: HIO50-C2
< x-amz-cf-id: oyhEXHPyEvMUq4M-81YI_uoZRj_E-iSgAjffJu4R28fQJ1RpisqT8Q==
<
(304) (IN), TLS Unknown, Unknown (23):
Connection #0 to host s7ie578tq4.execute-api.us-west-2.amazonaws.com left intact
["invalid input.  Request not processed. "]

Resolved issue: root cause is sample_data.csv must be in the s3 bucket root, not in the directory structure of the git package (tst/resources/...).

HI @chappg, Thank you for your feedback. I have updated the readme and specified the sample_data.csv file needs to be uploaded to the top level / root of S3.


rename Python in visual studio and automatic alignment setup

This issue has been moved from a ticket on Developer Community.

Hi, when we rename a class (or variable/function) in visual studio (VS) for C SHARP, it is pretty easy to rename all by right click to select rename. However, this important function is not existed in VS for Python. Moreover, the VS for Python does not able to automatic alignment setup the codes through comment and uncomment. Would you please kindly consider to add this two functions in VS for Python? Many thanks!

Original Comments
Jane Wu [MSFT] on 4/26/2019, 00:44 AM:
Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.
#### Graham Wheeler [MSFT] on 8/21/2019, 02:24 PM:
Your suggestion has been queued up for prioritization.  Feature suggestions are prioritized based on the value to our broader developer community and the product roadmap. We may not be able to pursue this one immediately, but we will continue to monitor it up to 90 days for community input

Thanks for the feedback! However, we don't have plans on changing this functionality at this time.


Call the runtime with WithRenumber() when asked by 'system renumber' command

We must have lost this at some point, rendering system renumber useless.

@giuseppe Thanks for catching this one

thanks for fixing it so quickly!  LGTM

/lgtm


[VA-5978] Make mediaReporting fields not required in xdm schema

https://github.com/adobe/xdm/issues/1550
In the process of preparing for making our media xdm schemas stable we need the following 2 commits:
Context:
Initially we wanted to make a clear separation between mediaCollection and mediaReporting schemas but unfortunately in order to not duplicate fields we need to use the same datatype (mediaDetails) for both.
We documented the Manage related fields usage in the AEP UI in this particular case such that clients know which fields are used for collection and which for reporting (Set up the schema in Adobe Experience Platform https://experienceleague.adobe.com/docs/media-analytics/using/implementation/implementation-edge.html?lang=en) but we would like to give the clients the possibility of using the schemas without a mandatory step of hiding fields, therefore in this PR we remove the required fields which are used on mediaReporting in our schemas, and only required mediaCollection fields remain.
First commit:

from sessionDetails remove the required check for ID because this is mediaReporting only field and clients only complete mediaCollection so if they choose not to hide mediaReporting fields from the schema, they should still be able to send us requests
from chapterDetails remove the required check for isStarted, isCompleted, timePlayed because these are mediaReporting only fields and clients only complete mediaCollection so if they choose not to hide mediaReporting fields from the schema, they should still be able to send us requests
from advertisingPodDetails remove the required check for ID

Second commit: Reverts https://github.com/adobe/xdm/pull/1716 the extraction of pccr field in only mediaReporting as these changes did not work (the AEP schema UI now does not show the pccr field anywhere not in mediaColecton and not in mediaReporting)

I readded the sessionDetails.ID field, just removed the required check.
So there should be no breaking changes with this PR because we only remove required checks and add back the pccr field.

The 3rd commit removes the required check for advertisingPodDetails.index which is only present on mediaCollection and not present on mediaReporting, so this is the reversed case to the first commit which contained fields not present on collection but present on reporting.


Some countries should get same-culture slave pops

https://forum.paradoxplaza.com/forum/index.php?threads/the-eu4-to-v2-converter-project.707362/page-190#post-20750571

I'm looking at this with an eye to not copypasting huge chunks from cultureMap into slaveCultureMap. It seems a more sensible approach would be to change what the "default" is in V2World::DetermineDemographics - the things getting african_minor right now are ones that have slaves, but no mapping defined in slaveCultureMap.  I've sketched out a preliminary default-switch based on continent (using the "main" culture in Asia/Oceania), but that is painting things with a fairly wide brush (for one, some granularity between the Middle-Eastern Arabs and, say, Korea, would be nice).
I can't decide whether slaves in African provinces should be african_minor or a relevant local culture (and if the latter, how do we pick which one.)

On this, I basically agree with what you have done.  I would say that African_minor should be used for Africa for two reasons.  One is that it is simpler, and the other is that from what little I understand of African slavery it tended not to be done to the same groups exclusively so any group of slaves would probably be from different backgrounds.  Although I'm sure that someone with more than superficial knowledge of African history would correct me on this.
What further granularity were you thinking of?  I thought most of the "Arab" slave trade was Berber, who are in Africa anyway.

Agreed, african_minor for Africa makes sense.
As for the granularity thing - the entirety of the Middle East is tagged as Asia. I don't actually know enough about the history of the slave trade to know where African slaves ended up, but wherever the dividing line between "use african_minor" and "use local culture" is, it feels like it should be further east than the continental boundary.

So I've had a think, and I suspect the best thing to do would be to use the continental divide, and add relevant slave cultures (presumably African minor, possibly Afro-Arab although that would have to be created) in the slave culture map for the Arabian cultures (plus Turkish and maybe Persian).

Ooh, I like that idea rather a lot. Will work on getting the relevant culture mapping done later today.

Augh. have coding done, it works as expected, something has gone truly weird trying to update my feature branch. Will try to figure out what's gone wrong with my Git and get a pull request at some point early next week.
Also, I did some research and it looks like the historical African slave trade didn't cover nearly as much of the Middle East as I'd thought; as a result I've tagged all of the Turko-Semitic and Iranian cultures to use african_minor, but only in two of the six EU4 regions. (Probably overkill, I'm fairly certain most of the area will only be a couple of those cultures (Turko-Semitic in particular is a long list) at any given point, but better safe than sorry.)

Fixed by #388 .  Thanks @woggy !


MetadataProperties not found after upgrade to version 0.3.0

Hello, after upgrade to version 0.3.0 it seems every lazy loaded collection crash on FilterQueryVisitor class at this line
public override DbExpression Visit(DbScanExpression expression)
{
// a bit harder to get the metadata in CSpace
var item = expression.Target.ElementType.MetadataProperties.First(p => p.Name == "Configuration");
...
}

with the exception "Sequence contains no matching element".
At the moment i'm using EntityFramework.Filters to implement soft delete on entity that use IDeferredDeletion interface. The filters are configured in this way:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
...
DbInterception.Add(new FilterInterceptor());

// Deferred deletion filter
modelBuilder.Conventions.Add(FilterConvention.Create<IDeferredDeletion, bool>("DeferredDeletion", (e, deleted) => e.IsDeleted == deleted));
...
}

then to enable or disable the filters from the UnitOfWork class:
public void DisableDeferredDeletionFilter()
{
this.DisableFilter("DeferredDeletion");
}

public void EnableDeferredDeletionFilter()
{
this.EnableFilter("DeferredDeletion").SetParameter("deleted", false);
}

With version 0.2 everything works properly. With 0.3 i need to change the configuration or is it a bug?
Bye Bye

Hi, I have the same problem with 0.3. It's correct to check this:
`// a bit harder to get the metadata in CSpace
var item = expression.Target.ElementType.MetadataProperties.FirstOrDefault(p => p.Name == "Configuration");
        if (item == null)
        {
            return base.Visit(expression);
        }`

Regards!


Python 3 on pypi?

Hi there
Any plans to release the Python 3 version of this onto PyPI?  I believe the PyPI version is still on 0.0.2 from 2017 which looks like Python 2 to me?
Thanks a lot

Good idea! I didn't know whether anyone was actually using this 😅 Happy to update, will look into remembering how pypi works soon

This is done at https://pypi.org/project/factorgraph/
Please let me know if you run into any issues!


Add prompt toolkit

What I Do

Add prompt toolkit to provide more native way to interact with the shell e.g. history and moving cursors
Fix link in README.md

This is an interesting change, but we need a way to avoid the repetition of the "intro" ("ChatGPT CLI" and "Model in use") at each message, because it's very annoying. I can work on that when I have a bit of time.
Thank you very much for the contribution!

Feel free to close or merge the PR.
Thank you for providing a Python script that integrates the ChatGPT api.
It fits my workflow perfectly. I will be happy to use it every day.

I did some additional little refactoring ad modifications. Now I'm ready to merge.