Question: [Bug]: Recently Added - Random album order?

This is only possible if your FS supports birth time. If you are using Linux, use `stat` to check that. You should see a line saying `Birth`

Example of FS that does support it:

$ stat docker-compose.yml
 File: docker-compose.yml
 Size: 484 Blocks: 8 IO Block: 4096 regular file
Device: 254,1 Inode: 750 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/corintio) Gid: ( 1000/corintio)
Access: 2024-12-21 15:06:32.012000000 -0800
Modify: 2024-11-24 11:03:32.700000000 -0800
Change: 2024-11-24 11:03:32.820000000 -0800
 Birth: 2024-11-24 10:34:49.188000000 -0800

If it is supported, set `RecentlyAddedByModTime=false`. If not, there's nothing I can do about it, and the option will fallback to using the time the file was added to the DB.

[Bug]: Recently Added - Random album order
### I confirm that:

- [x] I have searched the existing open AND closed issues to see if an issue already exists for the bug I've encountered
- [x] I'm using the latest version (your issue may have been fixed already)

### Version

0.55.0 (365df522)

### Current Behavior

When visiting "Recently Added" albums are placed in random order, with no seemingly good reason. I have checked music files (timestamps) and their content and nothing has changed since yesterdays Navidrome update. It affects all albums. Have run "Full scan" and "Quick scan".

### Expected Behavior

When visiting "Recently Added" newly added album should be shown in descending order, as it has always been.

### Steps To Reproduce

1. Log into Navidrome
2. Visit Recently Added (does this automatically upon login)
3. Random album sorting.

### Environment

markdown
- OS: Debian 12.9 (6.1.0-31-amd64) / Docker version 28.0.1, build 068a01e
- Browser: Brave
- Client: play:Sub

### How Navidrome is installed?

Docker

### Configuration

toml
services:
 navidrome:
 container_name: navidrome
 hostname: navidrome
 networks:
 prxnet:
 ipv4_address: 172.30.1.22
 user: 304:304
 volumes:
 - /mnt/ssd/music/sorted:/music:ro
 - ./data:/data
 - /etc/localtime:/etc/localtime:ro
 env_file:
 - container.env
 restart: unless-stopped
 pull_policy: always
 image: deluan/navidrome:latest
 healthcheck:
 interval: 5m
 start_period: 1m

networks:
 prxnet:
 external: true

### Relevant log output

shell

### Anything else?

_No response_

### Code of Conduct

- [x] I agree to follow Navidrome's Code of Conduct

i have also lost my "recently added" order since the 0.55 upgrade.

What is the value of `RecentlyAddedByModTime` config option?

- `false` (default): Albums will be sorted by `created_at` date, which is the oldest `birthtime` of the song files in the album. If your system does not support `birthtime`, it is the time it was imported to the library
- `true`: will use the newest `updated_at` (`mtime`) from the song files in the album.

This logic had a slightly different from previous versions, which could cause these "movements" in upgraded libraries.

Sorry for the inconvenience, but it was necessary due to the internal changes in the scanner/db model. Didn't anticipate it would be a "breaking" change.

i have `ND_RECENTLYADDEDBYMODTIME: "false"` in my docker-compose file, since: URL

i am now pretty confused. i don't understand why the BFR refactoring changed this at all.

I had to admit that my library also suffered some movements, about 30 random albums came to the top of Recently Added, and I didn't investigated in deep.

If this is a big issue for you, please open a new GH issue and we can discuss there, as this one was about the `RecentlyAddedByModTime` option, it seems.

I can also confirm that adding "ND_RECENTLYADDEDBYMODTIME=1" to my Docker config solved the issue for me too!!

0.55.2 I believe RecentlyAddedByModTime = true fixed the same issue for me as well

I had to do the same, otherwise things seemed to be vaguely sorted by Artist Name in descending alphabetical order. Adding new albums did not result in them appearing at the top.

[Bug]: Recently Added shouldn't rely on Update but Create timestamp
### I confirm that:

- [X] I have searched the existing open AND closed issues to see if an issue already exists for the bug I've encountered
- [X] I'm using the latest version (your issue may have been fixed already)

### Version

0.50.1

### Current Behavior

Modifications to (say) an album cover brings said album back into the top of the "Recently Added" queue, even though it might be an old album.

### Expected Behavior

Instead, "Recently Added" should only rely on the creation (or import?) date of the file that's being processed.

### Steps To Reproduce

 1. import two albums in Navidrome, with file timestamps far enough apart to make them sortable
 2. modify the old one by, say, adding an album cover

Expected result: the newer album before step 2 should still show up as the newest.

Actual result: modified album bumps the newer album.

### Environment

markdown
- OS: Debian GNU/Linux bookworm, Docker container
- Browser: Firefox ESR, but irrelevant
- Client: Supersonic or web

### How Navidrome is installed?

Docker

### Configuration

toml
---
# managed by Puppet, local changes will be lost
version: "3"

volumes:
 navidrome-data:

services:
 navidrome:
 image: deluan/navidrome:latest
 user: 10000:10000 # should be owner of volumes
 ports:
 - "127.0.0.1:4533:4533"
 restart: unless-stopped
 environment:
 ND_SCANSCHEDULE: 1h
 ND_LOGLEVEL: info
 ND_SESSIONTIMEOUT: 24h
 ND_BASEURL: ""
 ND_RECENTLYADDEDBYMODTIME: "true"
 ND_LASTFM_ENABLED: "false"
 ND_AUTOIMPORTPLAYLISTS: "false"
 ND_ENABLESHARING: "true"
 volumes:
 - "navidrome-data:/data"
 - "/srv/mp3:/music/mp3:ro"

### Relevant log output

shell
I perused the logs and didn't find much interesting, so I do not believe that is relevant.

### Anything else?

At first I thought this was because Navidrome only held a single timestamp for albums, but after inspecting the sqlite database (after fear of losing my ratings and play counts, which I *think* i did?), I noticed there was a `created_at` AND `updated_at` column, so that data is actually there, just not used correctly, I believe.

But here's two albums from the database that are sorted, IMHO, backwards:

sqlite> select name,artist,created_at,updated_at from album where name like '%American III: Solitary%';
American III: Solitary Man|Johnny Cash|2021-07-04T00:51:17.930079536Z|2023-03-09T22:58:57.431454258Z
sqlite> select name,artist,created_at,updated_at from album where name like '%Vertiges%';
Vertiges|zouz|2022-06-01T20:11:36.78922778Z|2022-06-01T19:44:39.486551366Z

There, "Johnny Cash" gets sorted first, as more "Recently Added" than "zouz".

Now of course, one fix to this is to run an SQL query updating my entire database to wipe off the differnet `update_at` timestamps, or at least tweak the ones that are incorrect, but that seems like shoving a problem under the rug...

Besides, maybe we *could* have a Recently Updated view as well? That would be interesting, listing the albums that have a different `created_at` and `updated_at` timestamp! :) Unfortunately, it looks like all those timestamps differ here, sometimes by only a few seconds...

### Code of Conduct

- [X] I agree to follow Navidrome's Code of Conduct

In my case, the workaround was relatively simple: I added a *lot* (350+) of covers all at once, in a short timeframe, so I could rewrite the `update_at` fields on those relatively easily with this query:

UPDATE album SET updated_at = created_at WHERE updated_at > '2023-03-06' AND updated_at < '2023-03-10' AND created_at < '2023-03-01';

But of course, if I fix an old cover again, that poor old album is going to come back up the list and try to play with the young kids and everyone is going to look at him sideways and think "ok boomer" and release a barely hidden sigh that will just make everyone really uncomfortable...

You have set ND_RECENTLYADDEDBYMODTIME to true which is not what you want from what your description reads.

 URL

The functionality you describe is implemented with #2553 as long as you dont Set ND_RECENTLYADDEDBYMODTIME (default is False)

Hmm... well that setting doesn't do what I thought it did though: I thought that would set the `created_at` field on import, but from what you seem to be saying here, it influences how the albums are *displayed*?

the `created_at` fields are correctly set here, just to be really clear.

That's correct. It is used for controlling how to display the Recent Added Albums view.

okay, so couldn't this be made in reverse, like at import time, if that setting is on, use the file mtime as the `created_at` field instead of `updated_at`? for me this thing is completely setup backwards, but maybe that's just me. :)

I think the fields should be used for what they mean: `created_at` for when the file was created/first imported (see #1350), and `updated_at` for when was the last time the record was changed in the DB. Inverting these two can cause confusion when maintaining the codebase, and it is just a matter of displaying sorted by one or the other, with no need to change their semantics.

Also, making this distinction at scan time, means that if you want to change it, Navidrome needs to rescan everything again - with a full scan - which can take days sometimes for some large libraries.

i see. so what are my options here?

i guess i could remap the `created_at` timestamp to `updated_at` if the latter is lower? would that work?

That should be the behaviour if you remove `ND_RECENTLYADDEDBYMODTIME: "true"`. The default behaviour (`false`) is to use import date (or birth date as per #1350)

okay well maybe that's where my confusion comes from: I thought `ND_RECENTLYADDEDBYMODTIME` was a feature flag that enabled the "birth date used on import" defined in #1350 - those two are actually unrelated?

No it is not!

`ND_RECENTLYADDEDBYMODTIME` selects whether to use `created_at` (false, default) or `updated_at` (true) for sorting the Recently Added albums view. This was implemented by #822 a couple of years ago.

#1350 (fixed by #2553) was released in 0.50.0, which replaces import date with birth date, on systems that support it, as that's a sensible thing to do (use the actual file creation date instead of the import date)

Ookay... I completely misread this! thanks for the clarification...

is there a way to *rescan* files so that their creation date is retrofitted back into the `created_at` field?

Try a full rescan. If that doesn't work, there's no other option except for re-adding all your files, which currently will make you lose your playlists and favourites/ratings/play counts :/

i noticed to that if the song already has a `created_at` timestamp, a full rescan will not refresh it with the file creation date.

Closing as this is not an issue, and making the full rescan reimport all timestamps is being handled in #2709

I'm actually going to reopen this and we can close it once #2709 is merged and officially released. That way the author can get notified of the fix being available.

@deluan If I create a track outside of the knowledge of Navidrome, and then, say, a year later I finally get around to adding it to Navidrome's "field of view", the album of that track does _not_ appear in the Recently Added Albums list. This is because Navidrome is looking at the date of creation of the track, not the date at which the album suddenly appeared in the music library. This is seems wrong. An album should be regarded as recently created if the album was recently added to the database; it should have nothing to do with how old or new the _tracks_ are. — I make this comment here because it seems to be part of the same discussion, but I'll be happy to open it as a separate issue if you prefer. Thx.

@mattneub What you want is the default behaviour, with `RecentlyAddedByModTime=false`. Did you change this option?

@deluan - I am looking for the exact opposite behavior. I got confused with all the configuration options so I will ask you instead. What are the correct settings for navidrome to consider recently added as when the file itself (not import) was created (and not updated, only created)?

Whenever I change tags on the music files themselves they appear as recently added with my current configuration.

Thank you


Question: Feature request Add some placeholders?

It's out now in the latest snapshot, but it is disabled by default. To enable it set the `extended-toggle` value in Essence's configuration (it's in the teleportation section) to `true`.

As of this version /tptoggle toggles both, but I might change that to /tptoggle in the future. I'll update the Wiki and drop a message here if that's the case.

Download: URL
Wiki: URL

Whilst this is a snapshot build it is tested and considered stable. However, as always I recommend backing up your server first. This version also contains #201

Feature request Add some placeholders
### What feature would you like to request?

Add some placeholders,such as the team name,team prefix

### Are you able to help implement the feature?

_No response_

### Is your feature request related to an existing bug or issue?

_No response_

### Please enter any additional comments below.

_No response_

Hi, does this refer to the placeholders we use in MOTDs and join/leave messages ( URL or placeholderAPI placeholders?

Team placeholders are out now in the latest snapshot alongside some other changes to placeholders, I'd highly recommend reading the linked Wiki page first. Essence doesn't currently provide team prefixes but I'm working on that so I'll leave this issue open for now.

Download: URL
Wiki: URL

Whilst this is a snapshot build it is tested and considered stable. However, as always I recommend backing up your server first. This version also contains URL and URL

Please note that due to changes in how placeholders work once you upgrade to 1.9.0 you cannot downgrade to a previous version.

A basic version of team prefixes is now available as well: URL

[Feature Request] Allow players to disable others teleporting to them via /tp
### What feature would you like to request?

It would be great if /tptoggle applied to /tp as well, so that other players who have access to `/tp` cannot teleport to them. Obviously OPs/Admins with perms can bypass this and teleport regardless.

This would likely just be an extension of `/tptoggle`, to include `/tp` itself in addition to `/tpa`.

Unsure if final syntax should still just be `/tptoggle` to toggle `/tpa` + `/tp`, or if there should be the ability to toggle `/tpa` and `/tp` individually, i.e. `/tptoggle tpa`.

### Are you able to help implement the feature?

Unfortunately not; Maybe I'll be more familiar with Essences codebase (and Paper plugins in general) in the future tho :D

### Is your feature request related to an existing bug or issue?

No

### Please enter any additional comments below.

_No response_

Thanks for the request! I'm working on this now. I've decided to make this a configurable feature that is off by default, so you'll need to enable it for it to work. I'll have a wiki page setup with a guide once it's tested & a snapshot build is out.


Question: simulations stopping with assert currentTimes.simTime <= simTime()?

@klonikar hello! I am also having trouble setting up GrADyS-SIM with OMNeT++ 6 on Windows. While I haven't quite figured out the root cause yet, I have created a new .ova virtual machine image in case you want to use it: URL

I saw that you also got the same idea as me of setting the simulator up on a Linux virtual machine, that's great! If you have any trouble, try the .ova image above and see if that helps.

Also, replied to you on your other issue about the SITL integration.

simulations stopping with assert currentTimes.simTime <= simTime()
All the simulations are failing with this error on the latest code.
gradys-error

The simulations were working in an old version which was part of the pre-created VM (OVA file). But none of the showcase ini files are working in the latest version. I have changed the paths for ArduCopter/ArduPlane/ArduRover in ini file to appropriate values and the SITL processes are running in the background.

Hello, thanks for using the project, and sorry for the slow response!

This 'currentTimes.simTime <= simTime()' error happens when the "RealTimeScheduler" can't keep up with real time. The scheduler is the OMNeT++ class responsible for dispatching events in the correct timings, the RealTimeScheduler provided by INED dispatches these messages to try to keep the simulation synched with real time. When the simulation is too slow (could be too many vehicles, computer resources, overhead from the virtual machine, etc.) the scheduler raises these exceptions.

An easy workaround is to simply remove the RealTimeScheduler, it should be on your .ini file with the key "scheduler-class". Removing this loses you the guarantee that your simulation will be synched with real time. You can still get pretty good results by manually controlling the simulation speed to approximate real time. If being precisely in synch with real time isn't one of your requirements, I would highly suggest this solution. If you do want to keep things synchronized, I'm afraid you will have to opt for a lighter simulated scenario

I was never able to figure out the exact mechanism that causes this assertion to fail. I highly suspect it's some implementation detail of the RealTimeScheduler class that I just never figured out. If I ever do, I will make sure to include a patched version of the class with the simulator. If you find a solution or the root-problem, please share it with us!

Also, I made a new .ova file to use with the new version of the simulator, that should help you with the setup if you are having trouble with that: URL

Thanks for responding. I will try out the removing the RealTimeScheduler. At this time, real timeness is not a strict requirement for me. I do not know why is it not able to keep up with real time even when trying it on a quite powerful linux machine and the default ini file **showcases/sitl/simple_simulation/omnetpp.ini** config **SimpleSitl** config which has `*.numUAVs = 2`.
If I find a workaround/solution, I will certainly share.

Do I need to replace the RealTimeScheduler with something else or simply remove/comment the line?

The simulations are working now after commenting out the RealTimeSimulator line. Among the 4 sitl showcases (gradys-simulations -> showcases -> sitl), 3 are working. The simple_simulation (SimpleSitl of ini file) starts but the vehicle does not move. I changed the waypoints file also but there is no movement. I think the logic in DroneMobilityMav::readWaypointsFromFile in DroneMobilityMav.cc may have something to do with it. Your if-else statements are processing GOTO, TAKEOFF, RETURN_LAUNCH commands but the file has only GOTO and REVERSE commands. In this function, you are not calling queueMessage like you do in MAVLinkFileMobility::readMissionFromFile and MAVLinkFileMobility::startMission.

The file mission.waypoints for file_mobility_simulation has more command types.

I am not that familiar with omnet++ so I could not dig further.

@Thlamz your OVA is ubuntu 20.04 and all the simulations are working with RealTimeScheduler enabled. Can you briefly describe your changes?

I see that your omnet++ is also built with OSG, OSGEarth but map imagery is not visible. Possibly that makes a difference as CPU does not have to render it.

Even the **SimpleSitl** is working (I only changed the paths to point to ArduCopter.elf and param files): The two quad vehicles properly go to sensor[0] and sensor[1] and return.

The only differences I see are ubuntu 20.04, python 3.8 instead of 3.11 and the git branch th-fixes instead of main... Even after shifting to main branch, SimpleSitl works. I am not clear why does it fail in my environment.

@klonikar I only changed configuration and build stuff. The main things I remember:
- Some of the paths set in Paths and Symbols were absolute and invalid on my machine, so I changed them to the proper ones
- I added the -lpython3.8 flag to get the python integration to work.
- Changed the protocol path for all modules that used the python integration
- Changed the .elf and param file paths for all modules that used the SITL integration
- The python sample in the showcases folder was completely broken, it's still a bit broken but at least it opens now, the python files were completely missing in the repository

You can see the full changes on PR #33. It's still being reviewed, which is why I didn't merge it yet.

I chose Ubuntu 20.04 because I always had trouble installing OSG on Ubuntu 22.04, which I think you yourself described here: URL

The map imagery really is not visible, even though I saw no visible errors. I am sure that with this same installation using python 5.6.2 the map imagery used to show. Since it was only visual I didn't investigate further, assumed it was just an incompatibility between OMNeT 6 and the OSG libraries. Your comment that it worked on Ubuntu 22.04 left me curious, I'll try to investigate further.

@klonikar fixed it and reuploaded the images! You can download the new one here. In case you don't want to redownload the image, the fix was very simple, just set the environment variable MESA_GL_VERSION_OVERRIDE=3.3.

That was quick 👍
I wasn't really complaining about the imagery not there... Rather, I thought the SimpleSitl worked because imagery was not there!! Thanks.

Thanks for the detailed reply. There is nothing in the PR that will solve the problem for SimpleSITL and also the RealTimeScheduler... Its only some added python files and change to use python 3.8 which is default for ubuntu 20.04.

This leaves me to wonder why does it work in your OVA but not in my real ubuntu 20.04 machine or the 22.04 OVA.

@Thlamz I think I found out the reason for RealTimeScheduler not working. When I changed the build type to debug (for both gradys-simulations and inet4.5) in your OVA VM, I always get the simTime() error. When I change it back to release build, I dont get it.

Then I created a brand new ubuntu 20.04 VM, installed all the required packages as given in omnet++ InstallGuide.pdf, including osg, osgearth. Changed the configure.user to enable osgearth, built the osgearth, inet4.5 in release mode... finally built the gradys-simulations in release mode and launched SimpleSitl.

I will close this issue unless you have something to add.

image

@klonikar Nothing to add! OMNeT does tend to run much slower in debug mode, so what you said makes complete sense.

Windows build with OMNET++ 6.0.2 throws error Class gradys_simulations::MobileNode not found
I managed to build on windows using mingw64 (not WSL) on **OMNET++ 6.0.2** and when running any of the showcases from within OMNET IDE, I get the following error:
image

I checked the size of the executable `out/gcc-release/src/gradys_simulations_build.exe`. Its only 100KB. The MobileNode.cc has the following code:

Register_Class(MobileNode);
//Define_Module(MobileNode);

If this file was part of the .exe, it should have been executed. It appears that the .o files created for any of the .cc in src are not linked.

I have followed your instructions on URL for running outside the docker. I also tried to run the executable from cmd line like below:

`gradys-simulations/showcases$ ../out/gcc-release/src/gradys_simulations_build.exe sitl/simple_simulation/omnetpp.ini
`

But this gives the following error:
image

Another thing I found was that 3 executables are created as follows:

out/gcc-release/gradys_simulations_build.exe
out/gcc-release/src/gradys_simulations_build.exe
out/gcc-release/src/pybind11_json/gradys_simulations.exe

I assume that the one in `out/gcc-release/src/gradys_simulations_build.exe` is the one to be executed for showcases. But that too does not work.

I was able to build on virtualbox based ubuntu 22.04. It needs openscenegraph 3.4.1 and osgearth 2.9.0. Follow directions on URL for Linux build but use GL2 instead of GL3:

git clone URL
cd OpenSceneGraph
git checkout OpenSceneGraph-3.4.1 # ==> this is new
mkdir build && cd build
cmake .. -DOPENGL_PROFILE=GL2 -DOSG_GL_CONTEXT_VERSION=4.6 # GL2 instead of GL3
make -j8
sudo make install
cd ..
git clone URL
cd draco
mkdir build && cd build
cmake .. -DCMAKE_CXX_FLAGS=-fPIC
make -j8
sudo make install
cd ..
git clone URL
cd osgearth
git checkout osgearth-2.9 # ==> this is new
mkdir build && cd build
cmake .. -DOSGEARTH_ENABLE_FASTDXT=OFF
make -j8
sudo make install

Then in config.user of omnetpp, change `WITH_OSGEARTH=no` to `WITH_OSGEARTH=yes` and build omnetpp using `./configure` and `make`.

That sounds great!

What do you think about do a PR do create a new dockfile for Ubuntu 22.04?

By the way, the build is successful but when running any showcase, I get an error "simulations stopping with assert currentTimes.simTime <= simTime()". I have created a separate issue for this.

Thanks. I will try out your .ova VM, though now I also have a virtualbox VM where gradys is built. I kind of gave up widows, and went ahead with VM. I think the first root cause is that the Makemake is not generating a proper Makefile to build the gradys related sources into obj files. When I hand modified the Makefile to build it, I am getting several "undefined symbol" errors for symbols in inet lib as well for winsock lib.

ld.lld: error: undefined symbol: inet::ClockUserModuleMixin ::exponential(inet::ClockTime, int) const
ld.lld: error: undefined symbol: __declspec(dllimport) WSAStartup
ld.lld: error: undefined symbol: __declspec(dllimport) socket

We need to add more `-l` options to the linker cmd line. But not sure how to fix the issue for building gradys sources.

I also have a linux machine where the build works fine but I get the simTime error.


Question: DeclareStrictTypesFixer split?

Hey! I'm closing this as no traffic around anymore. The idea could be valid, yet it didn't get any movement around.
If any of you see a value in it and are ready to implement it, please draft mini-RFC what you would like to achieve and how.

DeclareStrictTypesFixer split
So far, we have a (risky) fixer that adds/relocate `declare(strict_types=1)`.

I think we should split it.
1. fixer to add `declare` statement if missing (risky)
2. fixer to relocate declaration (non-risky) - here, with option what should be the position (same line with opening tag or next one).

We will be more generic and allow to have better user experience, like allowing to move declaration to same place for all files but not enforcing adding it to every single file. Or allow to place the declaration to place defined by `Extended Coding Style Guide` proposal.

Also, a ref: URL

Is there any progress so far? I'd really like to make my files look like:
`<?php declare(strict_types=1);`
and so fixer wont move declare statement anywhere.

@Arkemlar , no, as ppl were not finding this important enough. Feel free to raise the PR proposal.

@kubawerlos , if you have anything ready, I encourage to open a PR

@keradus it only does half of point 2, so not really ready :)

When making any changes to the way `declare` is handled, it would be awesome when the rule would **not** be applied to Interfaces as a `declare` doesn't make any sense in an interface.

See note at URL

@heiglandreas Thanks for the suggestion! I opened #6688 as it can be implemented separately.

If someone needs just only feature of having `declare(strict_types=1)` on same line as php opening tag:
`<?php declare(strict_types=1)`
Then look at this one URL
And at the bottom you will find a link to URL that has `DeclareAfterOpeningTagFixer` rule beside other useful rules. It solves my need just fine.

@heiglandreas can you help me a bit? I've seen that note you have copied from URL

and got surprised because I thought it is not how strict types are working.

So I've tried to do it myself at URL and cannot make it work the way it is - at least with my understanding - described in the note. What am I doing wrong?

Thanks for bringing that up.

And I have no good explanation for that issue that you are scetching out. Perhaps that is something for the bugtracker of the php-src.

The reason why I brought up that citation though was because the `declare_strict` is only relevant within files that actually **call** other functions. As an interface does - by definition - only **defines** function-signatures and **never** calls other functions, a `declare(stict_types)` is always unnecessary in an interface-file.

Just for the record: in #7053 we added ability to place namespace declaration in the same line as `<?php` or to enforce it in consequent lines. Probably we need similar flexibility for `declare()` 🙂.

Declare after PHP Opening Tag
Using 2.14 I'm looking for a fixer that takes care of moving the `declare(...)` statement right after the `<?php` opening tag (and one space in front).

<?php delcare(strict_types=1);

I imagined it would already exists so I was searching for it but after doing so my assumption grows it does not yet.

So I'd like to ask if there is anything like that in existence incl. preparation first of all, I see a lot of potential related issues as well so I can imagine this is perhaps a rule to apply PHP-CS-Fixer can not apply a working strategy across all rules, so any kind of feedback is welcome.

I would love that as well.

So, the rule should not allow it for anything *except* `declare()`.

That is currently not possible:

* `true` -> `declare()` is in next line
* `false` -> anything else can be on the same line

Speaking of rules and which configuration they could (theoretically have), this is my own mental model representation:
~~~
'blank_line_after_opening_tag' => 'true_unless_declare_which_is_forced_in_first_line_with_single_space_if_in_use',
/* commented out by intention 'declare_strict_types' => true, */
~~~

Important part here is that `declare_strict_types` should be independent to this setting, I use strict types in some files, but in some other files I do not and this is not a per directory rule or so, but just differs between files.

@apfelbox You still have interest for this one? And re-reading your suggestion somehow looks pretty viable in a rule on it's own. If other declare related rules are done beforehand (as we can say there should be none), your suggestion should be non-conflicting and it's perhaps possible to implement it.

I don't know about @apfelbox but as someone who has to review the strictification of a PHP app I sure would enjoy standardizing the `declare` on these files.

Is this (question / problem) still a thing?
Required the declare statement in a project with many (~6.000) existing files.
Had to play around with some parameters.

But in the end this setup did the job for me ... the declare statement on the first line.

$config = PhpCsFixer\Config::create()
 ->setRiskyAllowed(true)
 ->setUsingCache(false)
 ->setRules([
 '@Symfony' => true,
 '@PSR2' => true,
 '@PhpCsFixer' => true,

 'declare_strict_types' => true,
 'linebreak_after_opening_tag' => false,
 'blank_line_after_opening_tag' => false,
 ...

Those three last lines are those we use for enforcement.

They do solve the situation somewhat, but currently we have a lot of files with divergent declarations:

php
<?php declare(strict_types=1);

php
<?php
declare(strict_types=1);

or even

php
<?php
declare(encoding='SJIS');
declare(strict_types=1);

The problem is, that here it only ensures the existing line break (or not). It does not ensure, that there is no line break. So when you already have a line break here, it won't get removed. Probably this requires a new rule which ensures declare on same line as <?php opening tag.

Hello

If you still search for this rule, just found URL

Not tested..


Question: `let` indexes using noUncheckedIndexedAccess in TS 5.5.2?

If this is just an array, I don't see why you need `crypto-js` as part of the repro. Please provide a minimal example, with config, that shows what's happening

`let` indexes using noUncheckedIndexedAccess in TS 5.5.2
### 🔎 Search Terms

"array", "noUncheckedIndexedAccess", "5.5"

### 🕗 Version & Regression Information

- This changed between versions 5.4.5 and 5.5.2

### ⏯ Playground Link

 URL

### 💻 Code

ts
const a: number[] = [1, 2, 3];
let i: number = 1;

if(typeof a[i] === "number")
 a[i]++

### 🙁 Actual behavior

Typescript reports the following error:

Object is possibly 'undefined'.(2532)
const a: number[]

### 🙂 Expected behavior

It should not report an error for such cases

### Additional information about the issue

This obviously requires `noUncheckedIndexedAccess` to be enabled in the tsconfig.

This only happens when the variable used to access the array is non const (`let` in this case).

I think that TS 5.5 actually fixed the original behavior because in 5.4 if we remove the check:

ts
const a: number[] = [1, 2, 3];
let i: number = 1;
a[i]++

TS does not raise the same error (which would be expected as `a[i]` could be undefined).
The current workaround:

ts
const j = i;
if (typeof digits[j] === "number") {
 digits[j]++;
}

See: URL

And also the PR: #57847

This intentionally is only working for constant-like variables.

Heh, this is a fun one... in a sense this is surprising. TS thinks `i` is global here. If we just add `export {}` to the end of this file then it works like expected: TS playground

Even though it doesn't exactly look like it... this feels like a duplicate of URL . Obviously, this repro is wildly different from the other one but the implementation source of the problem is very likely the same

This is working as intended. We specifically exclude global variables from assignment analysis as the control flow analyzer can't see all references (there might be references in other files). Adding an `export {}` limits the scope to the current file at which point CFA can determinate the location of the last assignment and treat the variable as `const` for the remained of the file.

Thanks, for the clarifications, I was simply surprised because the behavior in a very "hello world" code is now a bit confusing for non-experienced people:

ts
function goThroughArray() {
 const a: number[] = [1, 2, 3];
 for(let i = 0; i < a.length; i++) {
 if (typeof a[i] === "number") {
 a[i]++; // a[i] can be undefined
 }
 }
}

Which is not exactly the reproducer I have send in the original issue, as I was trying to narrow this down.

However given that the compiler can't know if `i` was modified in the loop or not, I guess it's the best we can do for now.

Ah, shoot. I forgot that those are still global variables (even if not available on `globalThis`) and can leak across scripts 😢

This would be a duplicate of URL . CFA graph walk could likely check if an assignment happens between those 2 points but that could cost some perf.

Narrowing for constant indexed access fails on array getter
### 🔎 Search Terms

constant indexed access, array

### 🕗 Version & Regression Information

- This changed between versions `5.4.5` and `5.5.beta`
- This changed in commit or PR

### ⏯ Playground Link
_I could not repro this in playground, due to the lib import_

### 💻 Code

ts
import crypto from 'crypto-js'

const bar = "abc"
const foo: crypto.lib.WordArray = crypto.enc.Utf8.parse(bar) // Returns type: { words: number[], ... }
for (let i = 0; i
}

Adding suitable checks in the loop-body for falsey values does _not_ fix it, eg:

ts
if (foo && foo.words && foo.words[i]) {
 // Same code as above, same error
}

However the following _does_ fix it:

ts
const word = foo.words[i]
if (word) {
 foo.words[i] = word + 1 // OK
}

### 🙁 Actual behavior

error TS2532: Object is possibly 'undefined'.

### 🙂 Expected behavior

No error - this type-checked fine previously

### Additional information about the issue

This issue is new since the new `Control Flow Narrowing for Constant Indexed Accesses` feature. Rolling back to the previous typescript version 'fixes' it

You can often import npm packages in the playground just fine. It's capable of fetching their types.

I don't see any error here with the nightly version: TS playground. `foo.words` has `number[]` type so I'm not sure how `undefined` has crawled into all of this in your tests. Perhaps you are using `noUncheckedIndexedAccess`?

This would indeed show the difference in the behavior:
TS 5.4
TS nightly

This, in turn, looks like a correctness improvement.

@RyanCavanaugh yes I am aware of that, but I was unable to find a repro without the package.

@Andarist I think you nailed it - thanks so much, that must be the issue. Not sure what the action is here, I am closing but please re-open as necessary.

@RyanCavanaugh here is a minimal repro in TS Playground (based on @Andarist repro)

Including code here for ease of understanding:

typescript
// @noUncheckedIndexedAccess: true
interface Foo { words: number[] }
const foo: Foo = { words: [1, 2, 3] }

for (let i = 0; i < foo.words.length; i++) {
 if (foo.words[i]) {
 foo.words[i] = foo.words[i] + 1
 // ^Object is possibly 'undefined'.(2532)^
 }
}

<img width="530" alt="image" src=" URL

The problem here is that `i` is assigned to so it doesn't pass this check:
 URL

`i` is special in loops. We know that it's only assigned to after this loop block. So perhaps some extra fine-tuning for this case would be possible.

Oh, this just never works for variables that are reassigned:

ts
function f1(obj: Record ) {
 let key: string = "";
 if (typeof obj[key] === "string") {
 obj[key].toUpperCase();
 }
 key = ""; // toggle to see the error to go away and come back
}

This is kinda spooky to see an error pop up on a previous line that seemingly has no real correlation with the line that just got added.


Question: Improvement: Update the `URL` database model?

I am aware of this. Last time I checked, the logic in handling update was not fully implemented. The idea of using a central dispatcher with an dedicated queue I mentioned today should solve the problem, but I may use a more expedient solution for now.

Improvement: Update the `URL` database model
Do the following to improve the definition of the `URL` database model.

- [x] 1. Rename it. A good choice to rename to is `DatasetURL`
- [x] 2. Remove any field that is no longer needed. For example, `update_announced` can be remove once all the code for the V1 API is removed.
- [x] 3. Rename some of the fields to make them more informative. For example, `info_ts` can be renamed to `last_update`.

Note: The fulfillment of this issue should be done after the removal of V1 API and support of SQLAlchemy in put in place.

2 and 3 are pretty much outlined in the changes to the model needed to implement proper (cron or triggered) updates as in URL . Either URL model gets renamed - I don't care much but indeed smth like `RepoUrl` (I think we deal only with datasets ATM but could be regular git repos without UUID I guess in the future) would be more appropriate but not critical to rename, but could be done in conjunction with other changes needing migration. So I will add it to the project along with that #112

Yes, these changes will be done with whatever changes needed in #112.

"cron job" to keep dataset updated
I sorted by "Last update" to get a few which seems never got analyzed but the sample one I went to exists and well

URL | Dataset | Commit | Annex keys | Annexed files in working tree | Size of Annexed files in working tree (bytes)
-- | -- | -- | -- | -- | --
 URL | None |   |   | None | None |   |
 URL | None |   |   | None | None |   |
 URL | None |   |   | None | None |   |
 URL | None |   |   | None | None |   |
 URL | None |   |   | None | None |   |
 URL | None |   |   | None | None |   |
 URL | None |   |   | None | None |   |
 URL | None |   |   | None | None |   |
 URL | None

I even wonder if we should add some "Last update error" DB field to store information if it was some errored out execution and add it as the last column to web ui table to ease troubleshooting... WDYT?

This is suggested changes to the model which should IMHO facilitate all desired operations for checks more or less efficiently

patch
❯ git diff
diff --git a/datalad_registry/models.py b/datalad_registry/models.py
index 75c0faf..b9748d9 100644
--- a/datalad_registry/models.py
+++ b/datalad_registry/models.py
@@ -15,13 +15,20 @@ class URL(db.Model): # type: ignore
 annex_key_count = db.Column(db.Integer)
 annexed_files_in_wt_count = db.Column(db.Integer)
 annexed_files_in_wt_size = db.Column(db.BigInteger)
- info_ts = db.Column(db.DateTime(timezone=True))
- update_announced = db.Column(db.Boolean, default=False, nullable=False)
 head = db.Column(db.Text)
 head_describe = db.Column(db.Text)
+ head_dt = db.Column(db.DateTime(timezone=True))
 branches = db.Column(db.Text)
 tags = db.Column(db.Text)
 git_objects_kb = db.Column(db.BigInteger)
+
+ #: Last time the DB record was updated
+ last_update_dt = db.Column(db.DateTime(timezone=True)) # former info_ts
+ #: Last time we checked this URL
+ last_check_dt = db.Column(db.DateTime(timezone=True))
+ #: Non-null value means there is a pending check request, with a dt on when it was requested.
+ #: If non-null set, and another request comes in, ignore new request - keep old check_request value
+ check_request_dt = db.Column(db.DateTime(timezone=True), default=None, nullable=True) # former bool update_announced
 #: Whether initial data has been collected for this URL
 processed = db.Column(db.Boolean, default=False, nullable=False)

here is chatgpt produced code:

python
import time
from datetime import datetime
from sqlalchemy import create_engine, MetaData, Table, select
from celery import Celery

# Set up the Celery application
app = Celery('tasks', broker='pyamqp://guest@localhost//')

# Set up the SQLAlchemy engine
engine = create_engine('postgresql://user:password@localhost/dbname')

# SQLAlchemy models
metadata = MetaData()
URLs = Table('urls', metadata, autoload_with=engine)

check_minimal_time = 3600 # seconds -- so no checks for a URL
n_run_in_parallel = 10
sleep_waiting = 60
n_max_failed_checks = 10

@app.task
def check_url(url):
 pass # Implement your task here

while True:
 # Get all running tasks
 inspect = app.control.inspect()
 active_tasks = inspect.active()
 n_currently_running = len([task for tasks in active_tasks.values() for task in tasks if task['name'] == 'tasks.check_url'])

 n_can_run = n_run_in_parallel - n_currently_running
 if not n_can_run:
 time.sleep(sleep_waiting)
 continue

 with engine.connect() as connection:
 # SQLAlchemy query
 query = select([URLs]).where(URLs.c.processed == True)
 urls = connection.execute(query).fetchall()

 urls_to_check = sorted(
 [url for url in urls if url.check_request_dt and url.processed],
 key=lambda url: url.check_request_dt)[:n_can_run]

 if not urls_to_check:
 urls_to_check = sorted(
 [url for url in urls
 if url.processed and url.n_failed_checks check_minimal_time
 ],
 key=lambda url: url.last_check_dt)[:n_can_run]

 if urls_to_check:
 for url in urls_to_check:
 # SQLAlchemy update
 query = URLs.update().where(URLs.c.id == url.id).values(last_check_dt=datetime.now())
 connection.execute(query)
 # Adding tasks to celery
 [check_url.delay(url) for url in urls_to_check]
 else:
 time.sleep(sleep_waiting)

here is the code avoiding while True loop

python
import time
from datetime import datetime
from sqlalchemy import create_engine, MetaData, Table, select
from celery import Celery

# Set up the Celery application
app = Celery('tasks', broker='pyamqp://guest@localhost//')

# Set up the SQLAlchemy engine
engine = create_engine('postgresql://user:password@localhost/dbname')

# SQLAlchemy models
metadata = MetaData()
URLs = Table('urls', metadata, autoload_with=engine)

check_minimal_time = 3600 # seconds -- so no checks for a URL
n_run_in_parallel = 10
sleep_waiting = 60
n_max_failed_checks = 10

@app.task
def check_url(url):
 pass # Implement your task here

while True:
 # Get all running tasks
 inspect = app.control.inspect()
 active_tasks = inspect.active()
 n_currently_running = len([task for tasks in active_tasks.values() for task in tasks if task['name'] == 'tasks.check_url'])

 n_can_run = n_run_in_parallel - n_currently_running
 if not n_can_run:
 time.sleep(sleep_waiting)
 continue

 with engine.connect() as connection:
 # SQLAlchemy query
 query = select([URLs]).where(URLs.c.processed == True)
 urls = connection.execute(query).fetchall()

 urls_to_check = sorted(
 [url for url in urls if url.check_request_dt and url.processed],
 key=lambda url: url.check_request_dt)[:n_can_run]

 if not urls_to_check:
 urls_to_check = sorted(
 [url for url in urls
 if url.processed and url.n_failed_checks check_minimal_time
 ],
 key=lambda url: url.last_check_dt)[:n_can_run]

 if urls_to_check:
 for url in urls_to_check:
 # SQLAlchemy update
 query = URLs.update().where(URLs.c.id == url.id).values(last_check_dt=datetime.now())
 connection.execute(query)
 # Adding tasks to celery
 [check_url.delay(url) for url in urls_to_check]
 else:
 time.sleep(sleep_waiting)

re update: since some evil ppl could do "git push --force" and rewrite history we cannot just use `git pull` or even `git pull --ff-only` since it would not be guaranteed to work. I think the safest strategy would be to

try `git fetch`. If that is ok, means connection is good etc. Do `git pull --ff-only` and if that one fails, then `rm` cached copy, redo cloning from scratch for that URL. If `git fetch` fails -- announce check failed, and let above cron job to retry later.

@yarikoptic is `head_dt` the `authordate` of the current `HEAD`?


Question: Won't load the seed I input?

This is likely due to what I do here

I set the seed override to false when you're not at a MoonOfTheDay moon.

Looking at their code (which they mention is heavily inspired by MoonOfTheDay), they seem to touch that variable at the same time. So it'd be down to whichever mod loads first, as that one will be overridden iirc.

I think they can fix it by adding a soft dependency to MoonOfTheDay, which should cause their mod to be loaded after mine. Alternatively, they can set their patch to run last.

Won't load the seed I input
Hello, when I input a seed, the game still ends up generating a new seed instead of loading the seed I inputted

I can look at this later today, I thought this worked when I tested it but I might be wrong.

Could you please send me a list of mods that you are using? It is very likely that another mod is overwriting the seed that you set

Sure

BepInEx-BepInExPack-5.4.2100
RugbugRedfern-Skinwalkers-4.0.1
CapyCat-Solos_Ring_Compass-1.0.3
AlexCodesGames-AdditionalSuits-2.0.0
x753-More_Suits-1.4.1
Verity-TooManySuits-1.0.5
x753-Mimics-2.3.2
anormaltwig-LateCompany-1.0.10
notnotnotswipez-MoreCompany-1.7.6
tinyhoot-ShipLoot-1.0.0
thomas-AlwaysShowClock-1.0.0
TheFluff-FairAI-1.3.2
Rune580-LethalCompany_InputUtils-0.6.1
Renegades-FlashlightToggle-1.5.0
Renegades-WalkieUse-1.5.0
2018-LC_API-3.4.5
EliteMasterEric-Coroner-1.5.3
CapyCat-Solos_Bodycams-1.0.5
MoreLethal-Pinger-3.2.0
boxofbiscuits97-QuotaRollover-2.3.0
Bobbie-MetalRecharging-1.0.0
Coomfy-CoomfyDungeon-1.0.12
amnsoft-EmployeeAssignments-1.1.0
Evaisa-HookGenPatcher-0.0.5
Evaisa-LethalLib-0.14.0
MegaPiggy-BuyableShotgun-1.0.4
MegaPiggy-BuyableShotgunShells-1.0.5
matsuura-HealthMetrics-1.0.2
Toskan4134-LethalRegeneration-1.2.0
Stoneman-LethalProgression-1.3.2
JunLethalCompany-GamblingMachineAtTheCompany-1.3.5
MikeMediaStudios-MikesTweaks-2.0.2
MoonJuice-BuyRateSettings-1.3.1
Sligili-HDLethalCompany-1.5.6
akechii-DiscountAlert-2.3.0
Ozone-Runtime_Netcode_Patcher-0.2.5
AlexCodesGames-AdditionalContentFramework-1.0.3
HomelessGinger-MaskedEnemyOverhaul-3.1.1
ATK-LaterNights-0.9.1
Ozone-BepInUtils-1.2.1
Ozone-Glow_Steps-1.1.2
Pooble-LCBetterSaves-1.7.3
CTMods-KarmaForBeingAnnoying-1.1.0
zerouni-CustomRadio-0.1.1
rafl-CustomBoomboxMusicFixed-1.0.2
Mom_Llama-Lethal_Company_Enhancer-0.1.10
sunnobunno-YippeeMod-1.2.3
Azim-HoarderBud-1.0.10
blink9803-AutoFlyToCompany-1.0.1
darksnakex-NoCorpseHigherQuota-2.5.0
IntegrityChaos-Diversity-1.1.10
Suskitech-AlwaysHearActiveWalkies-1.4.4
FlipMods-TooManyEmotes-1.8.3
AllToasters-SpectateEnemies-2.2.1
Blorb-WeatherMultipliers-1.1.0
Sv_Matt-HideModList-1.0.1
PortableNavi-BetterInverseTeleporter-1.0.2
no00ob-LCSoundTool-1.5.0
Clementinise-CustomSounds-2.3.2
SkrimpGang-AAAAAGHH-1.0.1
darmuh-ghostCodes-1.5.1
F4ilS4fe-MaskTheDead-1.0.5
Dev1A3-ScannableCodes-1.0.2
ButteryStancakes-AccurateStaminaDisplay-1.1.2
OE_Tweaks-Possessed_Masks-2.0.2
extraes-LethalLoudnessMeter-1.0.2
ZG-ScalingStartCredits-1.0.6
Electric131-IsThisTheWayICame-1.1.4
SoraYuki-ShowAmmoCount-1.1.0
MaxWasUnavailable-MoonOfTheDay-1.0.4
Sligili-More_Emotes-1.3.3
Rattenbonkers-Teleporter_Cooldown_Reset-1.0.1
TwinDimensionalProductions-CoilHeadStare-1.0.3
FlipMods-ObjectVolumeController-1.0.4
eXish-Batteries-1.0.4
AgentRev-ShootableMouthDogs-1.0.1
CyanBlob-Motion_Tracker-1.0.0
ScruffyRules-BatteryText-1.0.0
CTMods-ChatCommands-1.1.7
FlooflesDEV-LCSeedPicker-1.2.1

I could try it on a very basic modpack (just the seedpicker installed) to see if that changes anything, too

I have found the conflicting mod: it is MaxWasUnavailable-MoonOfTheDay-1.0.4

When that mod is disabled in my modpack, that seedpicker works as intended. When it is enabled, the seedpicker is ignored

Crossposting from the issue on my end:

 URL

Should be an easy fix if you set your patch priority to run last @FlooflesDev

I was hoping that Harmony had a function like that, but I had some trouble finding it until now. Thanks for the help and for letting me loosely copy your mod :) (extremely new to Unity modding).
I fixed the issue in v1.2.2 of the mod.

[Mod Conflict] LCSeedPicker is not able to load inputted seed on vanilla moons with MoonOfTheDay is installed
When using my usual modpack, I first I thought that LCSeedPicker was not working, but when I used it by itself, it worked as intended.

I disabled mods to see if any were causing any conflicts. The seed picker works only when Moon of the day is disabled.

I just wanted to report the mod conflict for your information

Fixed the issue on my end:

 URL

Feel free to close this issue, thanks for the help!


Question: How can I get my output address like rtsp or file address?

You can use DeepStream with C++ or Python. My repo shows how to compile DeepStream to use Yolo models. You need edit deepstream apps code (deepstream-test1, deepstream-test2, etc.) as you needed and use compiled files.

How can I get my output address like rtsp or file address
ENV:
NVIDIA Jetson Xavier NX (Developer Kit Version)
 Jetpack 4.6 [L4T 32.6.1]
 Board info:
 Type: Xavier NX (Developer Kit Version)
 Libraries:
 CUDA: 10.2.300
 cuDNN: 8.2.1.32
 TensorRT: 8.0.1.6
 Visionworks: 1.6.0.501
 OpenCV: 4.5.1 compiled CUDA: YES
 VPI: ii libnvvpi1 1.1.15 arm64 NVIDIA Vision Programming Interface library
 Vulkan: 1.2.70
 jetson-stats:
 Version 3.1.2
 Works on Python 3.6.9

DeepStream Version 6.0.1
TensorRT Version 8.0.1.6

my config file is below：

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=3
#uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-hat.avi
uri=rtsp://admin:be92319@192.168.0.641:554
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
type=3
codec=1
enc-type=0
bitrate=4000000
rtsp-port=8554
udp-port=5400
sync=0
#gpu-id=0
source-id=1
#nvbuf-memory-type=0
#profile=1
output-file=out_res.mp4
udp-buffer-size=100000

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0

run log is below:

WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
Deserialize yoloLayer plugin: yolo_93
Deserialize yoloLayer plugin: yolo_96
Deserialize yoloLayer plugin: yolo_99
0:00:05.616159735 5167 0x4219600 INFO nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() [UID = 1]: deserialized trt engine from :/home/dvadmin/wxp/tensorrtx/DeepStream-Yolo/model_b1_gpu0_fp32.engine
INFO: [Implicit Engine Info]: layers num: 4
0 INPUT kFLOAT data 3x640x640
1 OUTPUT kFLOAT yolo_93 255x80x80
2 OUTPUT kFLOAT yolo_96 255x40x40
3 OUTPUT kFLOAT yolo_99 255x20x20

0:00:05.616422771 5167 0x4219600 INFO nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() [UID = 1]: Use deserialized engine model: /home/dvadmin/wxp/tensorrtx/DeepStream-Yolo/model_b1_gpu0_fp32.engine
0:00:05.627614037 5167 0x4219600 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 1]: Load new model:/home/dvadmin/wxp/tensorrtx/DeepStream-Yolo/config_infer_primary_yoloV5.txt sucessfully

Runtime commands:
 h: Print this help
 q: Quit

 p: Pause
 r: Resume

**PERF: FPS 0 (Avg)
**PERF: 0.00 (0.00)
** INFO: : Pipeline ready

** INFO: : Pipeline running

**PERF: 28.15 (27.98)
**PERF: 25.00 (26.41)
**PERF: 25.00 (25.92)
**PERF: 25.00 (25.68)
**PERF: 25.00 (25.54)
**PERF: 25.00 (25.45)
**PERF: 25.01 (25.38)
**PERF: 24.99 (25.34)
q
Quitting
App run successful

but I can not find out put file out_res.mp4
when I set sink0 type is 4, but I can not find out put rtsp url. I try to use rtsp://localhost:8554/ds_test but fail.
please help me think you very much

Sink for save file:

[sink0]
enable=0
type=3
# 1 = mp4, 2 = mkv
container=1
# 1 = h264, 2 = h265
codec=1
# Encoder type: 0 = Hardware 1 = Software
enc-type=0
sync=0
bitrate=4000000
output-file=out.mp4
source-id=0

Sink for rtsp output:

[sink0]
enable=0
type=4
# 1 = h264, 2 = h265
codec=1
# Encoder type: 0 = Hardware 1 = Software
enc-type=0
sync=0
bitrate=400000
rtsp-port=8554
udp-port=5400

The output link for RTSP streaming is `rtsp://localhost:8554/ds-test`

You can use multiple sinks by change their numbers (example: [sink0], [sink1], etc)

I'm sorry, but I still can't output MP4 files or RTSP using the method you recommended.

In fact, I have consulted NVIDIA's official blog, but it still hasn't been resolved。
my deepstream_app_config.txt is below:
`[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=4
#uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-safetyhelmet.avi
uri=rtsp://admin:beSdeV99@192.168.0.64:554
#uri=rtmp://192.168.0.186:1980/live
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000
# set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0`

In fact, I have consulted NVIDIA's official blog, but it still hasn't been resolved。see in: URL
my deepstream_app_config.txt is below:
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=4
#uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-safetyhelmet.avi
uri=rtsp://admin:beSdeV99@192.168.0.64:554
#uri=rtmp://192.168.0.186:1980/live
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000
# set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0

In fact, I have consulted NVIDIA's official blog, but it still hasn't been resolved。see in: URL
my deepstream_app_config.txt is below:
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=4
#uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-safetyhelmet.avi
uri=rtsp://admin:beSdeV99@192.168.0.64:554
#uri=rtmp://192.168.0.186:1980/live
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000
#set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0

Sorry, but I don't know what's going on in your case. Here it works normally.

Question: Deepstream source code
Thanks for creating this repo; I was under the impression that the Nvidia deepstream sdk has to be edited in a c++ file. Here it seems that is not how the interaction with deep stream taking place. Any information to clear up my misconception will be helpful.

If I use deepstream with Python, will that effect the performance issues compared to c++?

Do you know where I can access the deepstream apps code (deepstream-test1, deepstream-2)files?

Is the same performance, but Python is more sintax friendly than C++.
In this video, I'm using Python: URL

C code is located in /opt/nvidia/deepstream/deepstream-4.0/sources/apps/sample_apps/
Python you need install from link: URL


Question: HttpMessageHandler Passed To Constructor Of FhirClient Gets Disposed When FhirClient Is Disposed?

Noting through those posts it makes the point that it's not the actual HttpClient that is the issue, its the HttpMessageHandler that is the problem, and that's the thing you need to hang onto and the Factory helps manage things better.

HttpMessageHandler Passed To Constructor Of FhirClient Gets Disposed When FhirClient Is Disposed
**Describe the bug**
We are using the firely-net-sdk in a project and are experiencing port exhaustion when the server-web-api using the sdk is under high load. To deal with the issue, I tried to reuse the HttpMessageHandler that gets passed into the constructor of the FhirClient. However, the HttpMessageHandler gets disposed with the HttpClientRequester, that is created in the FhirClient's constructor.

**Expected behavior**
If I am not mistaken, a class instance passed into a constructor should in general not be disposed by the class using it. The BaseFhirClient should therefore only dispose the HttpMessageHandler if the class BaseFhirClient or the FhirClient created it. If the HttpMessageHandler was passed as a constructor parameter, the handler should not be disposed with the BaseFhirClient.

**Version used:**
 - FHIR Version: R4, maybe other versions are also affected
 - Version: 3.8.0

Kind regards,
Ashwani Mehlem

Have confirmed this behaviour, and have a simple fix for it.

Good idea to use the boolean `disposeHandler` of the `HttpClient` constructor. It saves us a flag in the `FhirClient` to remember not dispose the injected handler.

We will create a PR for this.

Thanks @brianpos, your fix solves the problem with the port exhaustion as the message handler can then be reused.

As a side note: It would be even easier if the constructor of the class FhirClient would take an HttpClient or an IHttpClientFactory as a parameter instead of an HttpMessageHandler, as this would allow using the HttpClientFactory-Pattern (see URL already mentioned in issue #2036.
The main benefit of this is that the HttpClientFactory handles the lifetime of the message handlers, which avoids DNS-Issues (which can occur when the message handlers live too long) as well as port exhaustion and performance problems (which may occur when too many message handlers are created in a short period of time).

Introduce HttpClientFactory in HttpClient
In (closed) issue #2032 , the discussion centered around re-using instances of the HttpClient. Currently, every instance of the FhirClient creates an instance of the HttpClient, but Microsoft recommends having a single HttpClient per application - which means the FhirClient should re-use one single instance.

**Describe the solution you'd like**
@brianpos suggests using a class called `HttpClientFactory` but it is unclear to me how this solves the problem.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
See issue the discussion in #2032 for more info.

I think with these changes to include the HttpClient via the constructor, then we don't need to do the HttpClientHandlerFactory stuff, and if someone wants to use that stuff, they can and we don't need to be involved.
(and we get the other unit testing benefits too as I've mentioned in the PRs.)

The HttpClientFactory creates and manages HttpClient instances and takes an available message handler from the pool. The HttpClient should be included in the constructor rather than the factory, so the consumer can reuse the same HttpClient.

@ewoutkramer, Now that the 3.8.3 and 4 beta release have the httpclient in the constructor of the fhirclient, I think we can close this issue as it enables the HttpClientFactory to be used without change in this library


Question: Fields with `setAllowedCharPattern` do not support some cases of removed `setPreventInvalidInput`?

We removed `setPreventInvalidInput` API in V24 since it was essentially broken. Closing this as no longer relevant.

Fields with `setAllowedCharPattern` do not support some cases of removed `setPreventInvalidInput`
### Describe your motivation

Using a pattern like "[0-9]{1,10}" to restrict the input to maximum 10 digits worked for TextField::setPattern, but not for TextField::setAllowedCharPattern. The new method only seems to check if every part of the input string fulfills the pattern, which an e.g. 15 digit long number does in the above example. But Regex already provides a mechanism to match a pattern multiple times by encapsulating it in a capturing group.

### Describe the solution you'd like

setAllowedCharPattern should not check if all parts of the input fulfill the pattern, but if the whole input fulfills the pattern. Same behavior as setPattern.

Please note that `setAllowedCharPattern` intentionally requires a regular expression that matches a **single character** to prevent typing invalid characters. We are not going to change this behavior, but we could probably document it better.

On the other hand, `setPattern` is just a shortcut for the native ` ` element logic (although we also implemented it for `TextArea` using custom logic, because in HTML, there is no support for `pattern` in ` ` element).

Does this mean that there might be an opportunity for a new feature that would show feedback in the same way as `setAllowedCharPattern` but do the validation based on the whole field content like `setPattern`?

We used to have `setPreventInvalidInput(true)` API, but it was badly broken by making it impossible to type anything with certain regular expressions - see #1143, #1635, #2986. The `setAllowedCharPattern` API was added to replace it.

`setPreventInvalidInput` is indeed often problematic since it uses the same pattern both for incomplete values and for the final value. I could imagine there are cases where you want to have a more permissive full-value pattern while typing and a more strict one for the final value.

Regardless of that, there's at least a workaround for the issue mentioned in the original issue by using `setMaxLength(10)` to limit the size instead of relying on the pattern for that purpose.

Thanks for the quick clarification. The workaround should be enough for most use cases, and a better documentation helps.

Hi,
I'm currently using setPreventInvalidInput method in my app and migrating to Vaadin 23/24, it's now impossible to get the same behaviour as before. My example is quite simple, we have a specific number pattern including thousand separator (\\d'?){0,5}.
I tried some combinason using the setPattern and/or setAllowedCharPattern, but none if them fits.
The user has to be able to enter either 99999 or 99'999, so the setMaxLength is not an option in this case.

Do you suggest another way of dealing with this case (without using validators of course) or can you consider un-deprecate this feature for the future versions ?

Regards,

Hi,
Any input on this issue ? The removal of this feature avoid us from migrating to version 24.
Is it possible to keep the setPreventInvalidInput method or at least keep a possibility to use it at a lower level ?
Thanks,

As has been mentioned, `setAllowedCharPattern` is not intended as a complete replacement for `setPreventInvalidInput`. The main purpose of that was to restrict which characters the user is allowed to type into the field, which `setAllowedCharPattern` does a better job of. We did not introduce an alternative for preventing input if the full value does not match a specific pattern because that has a questionable UX, and we recommend using validation together with showing an error as user feedback instead.

I opened a PR for clarifying the purpose of `setAllowedCharPattern` in the JavaDoc. As this issue was about changing how `setAllowedCharPattern` works, which we do not intend to do, I'll close this as resolved. Feel free to open a new feature request for introducing a separate feature for preventing input if the full input does not match a pattern, as suggested here: URL

setPreventInvalidInput(true) on EmailField prevents the user to type in anything
### Description

setPreventInvalidInput(true) on EmailField prevents the user to type in anything. E.g. Pressing `a` has no effect (well the cursor goes red briefly) since it's not a valid e-mail address.

### Expected outcome

I should be able to gradually type in e-mail address.

### Actual outcome

I can't type in anything.

### Minimal reproducible example

java
@Route("")
public class MainView extends VerticalLayout {

 public MainView() {
 final EmailField emailField = new EmailField("E-mail");
 emailField.setPreventInvalidInput(true);
 add(emailField);
 }
}

### Steps to reproduce

1. Paste the above to Skeleton starter and run it
2. Start typing text into EmailField - nothing happens.

### Environment

- Vaadin 14.8.7
- Ubuntu 21.10

### Browsers Affected
- [ ] Chrome
- [x] Firefox 99
- [ ] Safari
- [ ] Edge
- [ ] IE 11
- [ ] iOS Safari
- [ ] Android Chrome

Yes, but this luckily seems to work.

@Route("email")
public class EmailView extends VerticalLayout {

 public EmailView() {
 final EmailField emailField = new EmailField("E-mail");
 emailField.addValueChangeListener(e -> {
 if (!emailField.isInvalid()) {
 Notification.show(e.getValue());
 }
 });
 add(emailField);
 }
}

The web component seems to do the checking after every key stroke. But I think it should be done only when intended value change is to happen.

After some discussion we decided that the API shouldn't be there in the first place, and that it should be removed. Instead developers should rely on the regular validation, or set custom pattern validation, and let users correct their changes.
Meanwhile we can deprecate the existing method, and add a note to the JavaDoc that it has no practical use for email field.

I agree, but then what's the point of having an EmailField - what does it offer on top of a regular TextField?

With the introduction of `allowed-chars-pattern` ( URL we could, instead of removing `setPreventInvalidInput`, re-define it to toggle the usage of an allowed-chars pattern pre-populated with chars valid in an email address. That way the Email Field would prevent users from entering characters that are invalid in emails when `setPreventInvalidInput` is true.


Question: Login with UniversalLinkFlow auto direct Safari browser?

Sorry for the delay of syncing up. With discussion of the team, we think the current behavior is expected and there is no plan to make a change for it currently.

I am closing this issue due to the conclusion. Thanks for the report and your understanding.

Login with UniversalLinkFlow auto direct Safari browser
Hello, I'm applying Line login flow, but when I tried to call Login with UniversalLinkFlow when the Line app was installed before without login, when the Line App opened then auto-directed to the Safari browser.
- So In this case how to configure to Line app to keep that session without directing it to the browser?
- I have referred to another app like TikTok when logging Line no login yet, but the Line app still keeps that session.
- I also tried the example on Line SDK, whose behavior is still directed to the browser.

Maybe duplicated to URL

We are discussing the behavior internally. However, navigating to the web browser and allow users to continue the login process there seems to be a "not bad" solution for now. We will see if there is any way to provide a better UX, but now I cannot give any promise about it.

But I still have a question: why does the TikTok apply Line login still keep the Line app session instead of directing Webpage? Do have another version, solutions, etc,.. or do they do it on their own?

To my understanding, we do not provide any 'distinct version'. The behavior of LINE on iOS and Android platforms differs: on iOS, a webpage login is utilized, whereas on Android, the user is required to login within the LINE app itself. However, on Android, the user is not automatically redirected back to your application even after logging in. It necessitates initiating another login process from your application.

Could you clarify if you are experimenting on different platforms?

[iOS] Login line account auto switch from line app to line web
## Is it a security issue?

If you believe you have discovered a vulnerability or have an issue related to security, please **DO NOT** open a public issue. Instead, send us a mail to dl_oss_dev@linecorp.com.

## What did you do?

When I login line in iOS, my device has installed the Line app but still not login account. The issue is that when navigate from my app to the line app for starting login line account, it automatically switches from line app to the web line for login. I have setup onlyWebLogin variable false but not work.

## What did you expect?

When I setup onlyWebLogin variable as false, it will not automatically switch from Line app to web Line.

## What happened actually?

Auto navigate to web Line while line app is installed

## Your environment?

flutter 3.3.9
flutter_line_sdk: 2.3.5

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6.2 21G320 darwin-arm, locale
 en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.74.3)
[✓] Connected device (4 available)
[✓] HTTP Host Availability

Usually, if your channel app is still under development, this means you are not adding your LINE account as a testing account to your app. Please check and confirm the Developer Console and add your account in the tester list.

can you explain more detail about the tester list and testing account?

You can find the related setting in the LINE Developer Console (login from URL check your channel and invite the LINE account to the tester list.

<img width="1132" alt="截屏2023-12-05 13 18 45" src=" URL

For more, please also check this documentation: URL

But when i use the other user line account in iOs, is it necessary for this steip?

Only users on this list are allowed to use your channel while it is under development. After you mark the channel to be published, all LINE users can login to your channel.

My channel has been published. But the issue still be here and only happen in iOS when user has not login account in Line app

If the user does not yet log in the LINE iOS app, then it is the expected behavior: LINE app recognize the auth request from the LINE SDK and try to read the login status from itself. If not yet login, then it goes to an error handling process since no login user yet there in LINE.

That's right. Like the android, when navigate to line app for login, i can handle action in app. No need switch to web app

@tuyen3962 Ummm, thanks for the explanation.

I will record this and start a discussion with the team to see if we can improve it. But since it is already a long-lasting LINE iOS app behavior and not directly involved with LINE SDK side, it may take a while before a decision can be finally made. Let me try!


Question: bug: `npm run build` produces non functioning app...

You can fix it using `test: /\.(js|css)$/,`, something wrong in `manifest-webpack-plugin` (looks like a wrong hook)

bug: `npm run build` produces non functioning app...
One of the recent commits URL that I assume was supposed to reduce disk space and network traffic went wrong and broke the build.

Building the HTML5 app uses URL as a last step to compress files exceeding certain size.

The plugin works in a way where during the `npm run build` it leaves original files produced by `webpack` in place, and produces a `.gz` versions of all files that exceed the threshold specified in webpack config:

 URL

When using `deleteOriginalAssets: true` the plugin actually removes the uncompressed original files as they are not actually needed on the server

So a directory produced with `deleteOriginalAssets: false`:

-rw-r--r-- 1 mman staff 1423307 May 21 11:42 60.96569f9e.js
-rw-r--r-- 1 mman staff 2881 May 21 11:42 60.96569f9e.js.LICENSE.txt
-rw-r--r-- 1 mman staff 421274 May 21 11:42 60.96569f9e.js.gz
-rw-r--r-- 1 mman staff 160371 May 21 11:42 main.c742e74d.js
-rw-r--r-- 1 mman staff 1818 May 21 11:42 runtime-main.17566f78.js

Will look like this when `deleteOriginalAssets: true` is used:

-rw-r--r-- 1 mman staff 421274 May 21 11:42 60.96569f9e.js.gz
-rw-r--r-- 1 mman staff 160371 May 21 11:42 main.c742e74d.js
-rw-r--r-- 1 mman staff 1818 May 21 11:42 runtime-main.17566f78.js

This all looks nice and shiny, until we realise there is

## Problem 1: LICENSE.txt file gets deleted as well

We can see that it not only deleted the original `.js` file, but it also accidentally got rid of the `.js.LICENSE.txt` file that gets shipped along... This is probably a bug in the `CompressionPlugin`.

## Problem 2: Deleted original `.js` file does not get injected into `index.html`

There seems to be a race condition between the `CompressionPlugin` and the `HtmlWebpackPlugin` where `HTMLWebpackPlugin` does not properly inject required `.js` files into the `index.html` when they are removed by the `CompressionPlugin`. This should not happen as `CompressionPlugin` is mentioned last in our `webpack.config` but it does happen.

The result is that running either the `npm run build` or `npm run start` both result in an empty HTML5 app...

<img width="1192" alt="Screenshot 2024-05-21 at 11 25 04" src=" URL

Simple fix is to revert the commit URL

More complex fix is to figure out how to make `CompressionPlugin` play well with `HtmlWebpackPlugin`.

The original commit here URL was supposed to enable `WebpackCompressionPlugin`. However `WebpackCompressionPlugin` seems to be broken and does not play well with `HtmlWebpackPlugin` when `deleteOriginalAssets: true`.

I have filed two related bugs here:

 URL

 URL

I have temporarily fixed this by reverting the original commit, here: URL leaving open for investigation how to properly implement gzip + delete

The fix for URL is now part of the webpack so I am closing this issue and re-enabling the `deleteOriginalAssets: true` again.

Bug: `deleteOrigianlAssets: true` breaks the build badly...
### Bug report

Created an empty `npx create-react-app@latest webpack-compress-test`, added this plugin and broke the build.

Looks like `CompressionPlugin` is racing with `HtmlWebpackPlugin` and deletes original `.js` files too early... before `HtmlWebpackPlugin` gets a chance to process them.

#### Steps to reproduce:

1. Create new react app:

€ npx create-react-app@latest webpack-compress-test

Creating a new React app in /Users/mman/Developer/webpack-compress-test.

Installing packages. This might take a couple of minutes.
...

2. Add compression plugin dependency:

€ npm install compression-webpack-plugin --save-dev
added 5 packages, and audited 1561 packages in 2s
...

3. Eject config to get access to `webpack.config.js`

€ npm run eject

NOTE: Create React App 2+ supports TypeScript, Sass, CSS Modules and more without ejecting: URL

✔ Are you sure you want to eject? This action is permanent. … yes
Ejecting...
...

4. Try to build:

€ npm run build

Creating an optimized production build...
Compiled successfully.
...

5. Examine output:

€ ls -l build/static/js
total 1064
-rw-r--r-- 1 mman staff 4542 May 22 12:42 453.80dd94dc.chunk.js
-rw-r--r-- 1 mman staff 10597 May 22 12:42 453.80dd94dc.chunk.js.map
-rw-r--r-- 1 mman staff 143827 May 22 12:42 main.2663d1cb.js
-rw-r--r-- 1 mman staff 971 May 22 12:42 main.2663d1cb.js.LICENSE.txt
-rw-r--r-- 1 mman staff 371868 May 22 12:42 main.2663d1cb.js.map

6. Enable compression plugin:

Now modify the `config/webpack.config.js` and enable compression plugin as the last step to compress everything.

+const CompressionPlugin = require("compression-webpack-plugin");

...
+ new CompressionPlugin({
+ threshold: 0,
+ deleteOriginalAssets: true,
+ })
+

7. Try to build:

€ npm run build

Creating an optimized production build...
Failed to compile.

Cannot destructure property 'info' of 'compilation.getAsset(...)' as it is undefined.

### Actual Behavior

Build fails:

€ npm run build

Creating an optimized production build...
Failed to compile.

Cannot destructure property 'info' of 'compilation.getAsset(...)' as it is undefined.

### Expected Behavior

Build should succeed with all files being .gzipped

### How Do We Reproduce?

See the detailed steps above.

The repo contains broken code: URL
The commit here enables the compression: URL

I think we will need a fix in html-webpack-plugin too, I will investigate tomorrow deeply and provide fixes for html-webpack-plugin too


Question: Select by rectangle map tool shows up when feature selection mode is single?

@azizaparveen

## Cause
- This is an enhancement requested by the client to add support to turn off multiple selection in the table
___
## Solution
- Retrieve the selection mode from the config
- If selection mode is single, then allow only one feature to be selected at a time from the map/table
- If selection mode is multiple, then allow multiple features to be selected at a time from the map/table
___
## Dev Checklist

Items | Is required | Status | Comments
-- | -- | -- | --
Required NLS changes? | No | |
Required Backward compatibility | Yes | |
Required 508 | Yes | |
Need Sanitize? | No | |
___
## Impact Analysis Report
Impacted Areas | Comments
-- | --
Have Configuration changes? | No
Have Runtime changes? | Yes
Impact on RTL | No
Impacted components | - Feature table - Map card - Info card
Impact on runtime | When **Single selection mode** is selected Allow user to select only one feature (from map/table) On selecting a new feature, the previous selection will be removed and the user can select only one feature at a time Multi-selection tool from the map should be hidden- URL
 || When **Multiple Selection mode** is selected (current behaviour) Allow users to select multiple features using a table or Multi-Selection tool from the map
 || To support backward compatibility by default, Multiple option should be selected

Select by rectangle map tool shows up when feature selection mode is single
### Describe the bug

We added a new configuration parameter Feature selection, when the selection mode is single, this tool should not show up in the map and in the map feature selection should be single.

Image

### Expected Behavior

Select by rectangle tool will not show when feature selection configuration setting is single.

### Reproduction Steps & Sample

Test app: URL
1) Launch the app.
2) Notice the tool on the map and when selected, it lets us select multiple features.

### Other Relevant Info

_No response_

@azizaparveen @jmhauck

- This issue is not reproducible in local environment.
- Looks like featureSelectionMode property is not set on the mananger component
Possible solutions
 - Please check if the featureSelectionMode property is being passed to the Crowdsource Manager app .
 - URL
 - According to this if it is not passed properly then featureSelectionMode will be multiple by default

@sumitzarkar Editor widget added multi selection tool in this release, In Manager we are skipping this page but I believe we will need to show this page for bulk attribute editing. If we show this page, the toolbar with multi selection tool will be showing right?

If it shows then we will not need the multi selection map tool (select by rectangle tool) we added. Wondering if these tools can work with this feature selection mode settings. When single selection is selected in the setting, these tools will be hidden and bulk attribute editing will not be possible

Image

Add support to turn off multiple selection in Table in Manager
### Describe requirements

We got a user request to provide option to turn off multiple selection in Table, currently the record selection from table behaves the same way as map viewer and allows multiple selection. With this new option users will be able to configure the selection mode depending on their need.
We can add this as a configurable option in the Interactivity-> Table options section.

Image

### Alternatives

_No response_

### Other Relevant Info

_No response_

### Impact

_No response_

@azizaparveen

We need to implement this in config and runtime as well:

## Configuration
- Add an option to select the 'Selection Mode'
 Image
- To support backward compatibility by default Multiple option needs to be selected
- This needs to be implemented in Configuration

## Runitme
- Currently, runtime supports multiple selection only
- We will update the code to work as per the selected 'Selection Mode' in the configuration
- When Single selection mode is selected
 - User will able to select only one feature (from map/table)
 - If selecting a new feature previous selection will be removed and the user can select only one feature at a time
 - Hide the Multi-selection tool from the map - URL
 - When Multiple Selection mode is selected (current behavior)
 - Allow users to select multiple features using a table or Multi-Selection tool from the map

Please confirm if our understanding is correct

@azizaparveen
- The feature table toolbar contains various tools.
- In single-selection mode, only one feature can be selected at a time.
- Therefore, tools, like Select All (which selects all features) and Switch Selection (which toggles the selection), are unnecessary in the single selection mode.
- These tools should be hidden when single-selection mode is enabled.

Let us know your thoughts on this

The config option is added to the Modify tab of Manager. @jmhauck could you please create a prop for this so CT team can connect this with the component?

Image

@sumitzarkar @pratiksabale07 Single feature selection option lets me select multiple.

 URL

Image

@jmhauck

- To support backward compatibility, Multiple option is enabled. In this case, it seems the configured props is not passed to the component, and hence we see multiple selections.
- Could you please confirm if this configuration is passed to the Manager Component property 'featureSelectionMode'


Question: Read and store checkpoints from live data?

Since in branch write-to-PLC we started working on this Issue, let us state the problem with detail and provide some constraints set from the domain expert @ge0rgemera.

We have decided to work with a simpler case, at least for now, that involves the ground source (BTES) solar assisted heat pump. In this case, we can control the hp by changing the value of the corresponding **setpoint**. The setpoint has to have a value in range $[15, 51]$, but it cannot be changed arbitrarily. Specifically:

- If the hp *general alarm* is on, no operation on the hp is acceptible.
- The hp should not be turned on/off in a time period less than *5 minutes*.
- If the top layer temperature exceedes *52 oC*, the hp must be turned off.
- If the temperature of the ground BTES tank is less than *8 oC*, the hp should be turned off. If this case is true, no other operation on the hp setpoint is acceptible until the temperature of the BTES tank becomes $\geq 12\ oC$, in which senario the hp must be turned back on.

Read and store checkpoints from live data
Currently, in live data analysis, we only read the `checkpoints` but do not store them. This functionality needs to be implemented, and a few considerations should be taken into account:

1. As this type of data changes sparsely, the corresponding value should be stored only when it changes to avoid storing redundant data.
2. We should also consider the representation of the checkpoints to assess their similarity with previous values.

The checkpoints represent temperature values that define the desired temperature range for the corresponding container. For instance, if the checkpoint is 42.0, then the temperature $t \in[42.0 - \delta, 42.0 + \delta ]$ for some $\delta \geq 0$. Currently, the configured $\delta$ is set to 5.

@ge0rgemera highlighted that when adjusting the checkpoints, they typically modify the integer part of the float and very rarely alter the first decimal. Therefore, we should focus on storing checkpoint values that adhere to these patterns.

This Issue is to be fixed by PR #33, but it should be revisited when we develop code that remotely changes the values of the checkpoints.

Is there an issue outlining what should be checked or changed when that code is developed?

I was thinking that we could create it once we agree on the structure of the code in Issue #30.

Writing checkpoints
Corresponding experiments and checks should be conducted in order to succesfully being able to write to the checkpoints' registers.

Noting here that after designing the mechanism for remotely setting checkpoints, some of the code in PR #33 might need to re-visited, as it will be possible to simplify it under the assumption that checkpoints will not be set via other channels.


Question: Wheels for Python 3.11 and PyPy?

Currently all the wheels are built by GitHub Actions, in this job: URL

GitHub doesn't directly support ARM runners as far as I know (but I could be wrong), so getting additional wheels up probably requires some sort of virtualization. I'm sure something with QEMU is possible, but I don't have a ton of experience with this. Things might get a lot easier if we could use URL directly for this, but I'm not sure.

Wheels for Python 3.11 and PyPy
It would be nice to have wheels for Python 3.11 and PyPy (3.7 and 3.8), so as to not need cargo when installing blake3 in such environments.

This is a mere request, not a demand nor anything. Thanks for the good work here!.

Similar issue: URL

I currently use GitHub Actions to build all the wheels. If there's an easy way to get Actions (and particularly the `actions/setup-python@v2` helper that we use here) to install these versions of Python, I'd be happy to add that. According to these docs there might be:

 URL
 URL

That said, if we add something like `3.11.0-alpha.3`, we might want to think a bit about what our update policy is. As new alphas come out, do we expect to add them to the build "whenever"? Or is there some way to automate this? Maybe check for new Python versions persistently, like once a day, rather than tying them exclusively to versions bumps of this library? Not sure what's the most reasonable solution here.

True, I've honestly been only building wheels for linux, but most of my projects have no building deps so it doesn't make much of difference (which is why I haven't tried anything else yet).
Gonna give you a hand later today

cibuildwheel is becoming pretty standard as a way to build wheels for lots of platforms. You can see pyzmq as an example that builds wheels including a bundled (C++) library dependency, covering pypy, arm, windows, etc.

Python 3.11 has been released, so it might be time to make a new release of blake3
 URL

ugh, yeah, seems like 3.11 isn't in macOS yet, but should be soon, i hope 🙏

I don't see them in the latest release :P
Do you have to make a new release or can u manually push them?

Oh my bad, the binaries made it to GitHub but not PyPI. Let me kick it again...

hahaha awesome! I just tried in a mac and i got the wheel, and i can clearly see the rest of the wheels, so i'm closing this as fixed.

thanks so much!

I guess the question of Pypy binaries is still open? But I kind of imagine anyone going out of their way to run Pypy can probably also install a Rust toolchain and let Pip build from source?

You are correct, we are still missing the PyPy part :P
and of course, anyone using it will know what to do regarding rust toolchain, but the same goes for CPython users. If you are planning to add PyPy as supported (meaning tests for it, i guess), and/or add it to the build chain, then i can reopen this issue (or better yet, create a new, specific one)

Linux wheel for aarch64 and armv7 architecture ?
I've seen that you've provided lots of wheel package but could you please provide linux wheel for aarch64 and armv7 architecture ?

URL uses Docker and qemu to run emulated aarch64 containers to build wheels. I'm currently working on getting this to work with pytaglib and it seems to do its job (although slow, unsurprisingly).

I found a build service that's half the price of GitHub actions and has support for arm64 URL

Great news @oconnor663 GitHub has a beta for arm64 runners!

You can sign-up here: URL

you can simply use the `maturin-action` like pydantic does: URL

I saw you use python scripts to upload as release assets.

in constrast, pydantic uses github artifacts for uploading the wheels, and downloads them again in the publish step.

then, you can upload them as release assets and to pypi using dedicated actions (example) too. you won't need PyGithub or your python scrips anymore. 100% yml :)

this example ^ uses pypi trusted publishing (no user/pass). all you need to do is add oconnor663/blake3-py as trusted publisher here and add the `permissions` in the github action as per the example.