ghostty: init at 1.0.0

Adding Ghostty:
Ghostty is a terminal emulator that differentiates itself by being fast, feature-rich, and native. While there are many excellent terminal emulators available, they all force you to choose between speed, features, or native UIs. Ghostty provides all three.

Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[X] sandbox = true

[X] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Also needs to be reformatted w/ nixfmt-rfc-style

Any chance we can also get Ghostty's terminfo file added to the NixOS terminfo database, or does that belong in a separate PR?

Any chance we can also get Ghostty's terminfo file added to the NixOS terminfo database, or does that belong in a separate PR?

That should be handled already, there's a terminfo output in the package and environment.enableAllTerminfo should install it.

Would it be possible to include a patch so that ghostty runs without io_uring (which is disabled on linux-hardened)?
sed -i 's/^const xev = @import("xev");$/const xev = @import("xev").Epoll;/' **/*.zig

https://discord.com/channels/1005603569187160125/1312996817264181350 (sorry)
https://github.com/mitchellh/libxev/issues/131
No idea if this causes any visible performance issues

Would it be possible to include a patch so that ghostty runs without io_uring (which is disabled on linux-hardened)?

That's the sort of thing that you can patch with overrideAttrs in your own Nix config. Let's follow upstream's lead here.

The runtime closure includes all the zig sources:
$ nix path-info --recursive ./result
[...]
/nix/store/8pgw0b3ymk014c1v7l5pc9ymj4dfd6nx-freetype
/nix/store/9bgzradqy1346lcj56d32mfcdjyinjk6-oniguruma
/nix/store/az6rd4gxwskz4y6l94cm0axgn5bks3wa-glfw
/nix/store/b2wn0akxsjr3g5gx3yzahmgj588q44mp-vaxis
/nix/store/c1qpqqm0m13mblz3f33saa27sxxd3m1x-wuffs
/nix/store/d6h0qkxnq0abkg7483c7x66b8sappdyd-z2d
/nix/store/dpqgcdf9nc4jn0dwbxbvy1vqvfyl77sa-vulkan_headers
/nix/store/dr9nnmiawcanp8wr7p99jdyb41yxfw3a-highway
/nix/store/f5zs2lbbx451slw0h91dlgldfv3cr63v-utfcpp
/nix/store/fl90p12n0yxvkhhn2kfhirhc320lgxpk-wayland_headers
/nix/store/gj6v5dbyacy8z9ph5llmagmf128vdl1x-iterm2_themes
/nix/store/h4n0xbm6dg132v7g0v3zq9g8qvrmclmr-ghostty-1.0.0-terminfo
/nix/store/h991k3x95mmig7i993dfyibbmiqn094p-fontconfig
/nix/store/hs1vqpyyw2xg04jpy7y21127iw1sjyyz-zigimg
/nix/store/ilx7scnpgxycfmj6cq5qf31spyykma84-libpng
/nix/store/q6jsp14xjmk08zqf8gg9hfc95448sghc-harfbuzz
/nix/store/qb3f9gd22c2sbp00ng1fpk7hmfk23wvm-zig_objc
/nix/store/qp1m1zci2n60idvv79sblq82lml18l6g-imgui
/nix/store/wa8zy9z7ngwn9mzhjpqxy1260dzngczj-glslang
/nix/store/xbwlxzyyzha763mz231bia72ybnzmbbc-mach_glfw
/nix/store/xk13b5q3c3x7rh1rqm355zf0y1zdgm9p-libxev
/nix/store/xwnpf0q80wijjnn4s7sk82syxdfzqhzh-zlib
/nix/store/p9p2056gs8cqqiwsnrpdvhk12rbd40si-ghostty-cache-1.0.0
/nix/store/w6skm2pz5dc6dk8w2g92hl2jd2q2yc49-oniguruma-6.9.9-lib
/nix/store/wqnzn50w9kflabjlnm8m3sm8k5kbwgf5-ghostty-1.0.0-shell_integration
/nix/store/xgfyyyxxpq5x6rd15w2xigwzdiv10gni-ghostty-1.0.0

Would be nice if we could get rid of those references. There seems to be a reference in the binary to /nix/store/p9p2056gs8cqqiwsnrpdvhk12rbd40si-ghostty-cache-1.0.0/1220bc6b9daceaf7c8c60f3c3998058045ba0c5c5f48ae255ff97776d9cd8bfc6402/imgui_demo.cpp. I think we should be able remove this without causing issues using removeReferencesTo.
Here is the fix, feel free to squash into your init commit: https://github.com/jcollie/nixpkgs/compare/ghostty-init-1.0.0...fpletz:nixpkgs:pr/368404/remove-zig-src-refs

It may also be nice to pull glslang, spriv-cross, and simdutf as well since we have them in Nixpkgs: https://github.com/ghostty-org/ghostty/blob/35b9ceee2116331b83c0c86269394e2545070b0f/build.zig#L271-L280

I'm not prepared to make such large changes to the code in the package. That's something best taken upstream to get a proper build option to use the system version.

That's something best taken upstream to get a proper build option to use the system version.

Zig already has this option built in via its -fsys flag (which upstream also mentions in the comment above the one I linked). It should only require that and adding the packages to buildInputs
I'm also pretty sure this is intended for packagers, judging by the comment saying it's only not a default due to the lack of package availability in other distros/repos

This review has been done with warden, please report any issues!
Packages built

✅ ghostty
nix-info -m

system: "x86_64-linux"
host os: Linux 6.12.5-xanmod1, NixOS, 25.05 (Warbler), 25.05.20241219.d70bd19
multi-user?: yes
sandbox: relaxed
version: nix-env (Nix) 2.25.3
nixpkgs: /etc/nix/inputs/nixpkgs

That's something best taken upstream to get a proper build option to use the system version.

Zig already has this option built in via its -fsys flag (which upstream also mentions in the comment above the one I linked). It should only require that and adding the packages to buildInputs
I'm also pretty sure this is intended for packagers, judging by the comment saying it's only not a default due to the lack of package availability in other distros/repos

At this point, I'd like to get the current package merged. Once that's done we can refine things in follow-up commits.

I suggest leaving -fsys changes to a separate PR. As a comment on the PR it's asking for open ended work that 'looks simple'. I took the bait and looked; it's not simple, it requires more than you've pointed at to correctly configure, and then it still breaks.
simdutf is incompatible: 5.0.6 packaged vs 4.0.9 upstream
glslang might work
spirv-cross seems to follow a different naming convention than the one zig expects lib/libspirv-cross-c.a vs lib/libspirv-cross.a`

Could you add this to nixos/tests/terminal-emulators.nix and add the resulting test to passthru.tests?

I tried for a while to get this to work but was not able to. It may be my lack of understanding of what's needed here or possibly there's something upstream in Ghostty that needs to be fixed. In either case I don't want to hold up the package for this. I'll work on it in a subsequent patch.

At this point, I'd like to get the current package merged.

Are we in that much of a rush here? This is a quite a large, popular, and a bit complicated package. I think it'd be ok for us to take some time to clean things up a bit and make sure we land this in a good state -- it's only been 9 hours since this was originally submitted after all

it's not simple, it requires more than setting just -fsys flags, and then it still breaks.

Thanks for looking at all of this. I had only glanced at build.zig, and these dependencies seemed to be linked in the same way as all the others, so I figured it would be no different.
Some of these are totally out of scope for this PR, but I think it'd be worth it to link with glslang -- which does seem to mostly work OOTB
Here's a patch that does that, fixes some formatting/lint issues, and adds the NixOS test recommended above

diff --git a/nixos/tests/terminal-emulators.nix b/nixos/tests/terminal-emulators.nix
index 1affcbf3c8f7..3fc820d3ac8b 100644
--- a/nixos/tests/terminal-emulators.nix
+++ b/nixos/tests/terminal-emulators.nix
@@ -44,6 +44,8 @@ let

     germinal.pkg = p: p.germinal;

+    ghostty.pkg = p: p.ghostty;
+
     gnome-terminal.pkg = p: p.gnome-terminal;

     guake.pkg = p: p.guake;
diff --git a/pkgs/by-name/gh/ghostty/package.nix b/pkgs/by-name/gh/ghostty/package.nix
index 38bf66e654b2..aebd3f8e7293 100644
--- a/pkgs/by-name/gh/ghostty/package.nix
+++ b/pkgs/by-name/gh/ghostty/package.nix
@@ -7,10 +7,8 @@
   fetchFromGitHub,
   fontconfig,
   freetype,
-  git,
   glib,
-  gsettings-desktop-schemas,
-  gtk4,
+  glslang,
   harfbuzz,
   libadwaita,
   libGL,
@@ -20,7 +18,6 @@
   libXi,
   libXrandr,
   ncurses,
-  nix-update-script,
   nixosTests,
   oniguruma,
   pandoc,
@@ -82,14 +79,21 @@ stdenv.mkDerivation (finalAttrs: {
   # doCheck is set to false because unit tests currently fail inside the Nix sandbox.
   doCheck = false;
   doInstallCheck = true;
-
+
   deps = callPackage ./deps.nix { name = "${finalAttrs.pname}-cache-${finalAttrs.version}"; };

-  zigBuildFlags = [
-    "--system"
-    "${finalAttrs.deps}"
-    "-Dversion-string=${finalAttrs.version}"
-  ];
+  zigBuildFlags =
+    [
+      "--system"
+      "${finalAttrs.deps}"
+      "-Dversion-string=${finalAttrs.version}"
+    ]
+    # Some dependencies are vendored by default due to package availability issues in other repositories
+    # https://github.com/ghostty-org/ghostty/blob/35b9ceee2116331b83c0c86269394e2545070b0f/build.zig#L271-L280
+    # TODO: Use our spriv-cross & simdutf -@getchoo
+    ++ lib.mapAttrsToList (depName: package: "-fsys=${depName} --search-prefix ${lib.getLib package}") {
+      inherit glslang;
+    };

   zigCheckFlags = finalAttrs.zigBuildFlags;

@@ -120,11 +124,17 @@ stdenv.mkDerivation (finalAttrs: {
   NIX_LDFLAGS = [ "-lX11" ];

   nativeInstallCheckInputs = [
-      versionCheckHook
+    versionCheckHook
   ];

   versionCheckProgramArg = [ "--version" ];

+  passthru = {
+    tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
+      nixos = nixosTests.terminal-emulators.ghostty;
+    };
+  };
+
   meta = {
     homepage = "https://ghostty.org/";
     description = "Fast, native, feature-rich terminal emulator pushing modern features";

Are we in that much of a rush here? This is a quite a large, popular, and a bit complicated package. I think it'd be ok for us to take some time to clean things up a bit and make sure we land this in a good state -- it's only been 9 hours since this was originally submitted after all

Since this package is pretty hyped due to the private beta phase and the recent 1.0 public release, lots of people are eager to test this out. Just look at all those emoji reactions. :rocket: IMHO it makes sense to have an acceptable expression in unstable ASAP and fix minor issues later.

Just look at all those emoji reactions

Yep, this is already top 1 of open pull requests by counting :+1: and top 3 of all PRs ever created in nixpkgs.
https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+sort%3Areactions-%2B1-desc+

If one is that eager to test it (like me 😉), just copy the two nix files to your own config. 😁
For me, that's: https://github.com/pbek/nixcfg/tree/main/apps/ghostty
I also added some theming: https://github.com/pbek/nixcfg/blob/7dca177846233172665331b17df55802020600a8/modules/mixins/ghostty.nix#L16-L40
Don't forget to do a infocmp -x | ssh YOUR-SERVER -- tic -x - when you want to SSH into a server with it (see https://ghostty.org/docs/help/terminfo).

Are we in that much of a rush here? This is a quite a large, popular, and a bit complicated package. I think it'd be ok for us to take some time to clean things up a bit and make sure we land this in a good state -- it's only been 9 hours since this was originally submitted after all

Since this package is pretty hyped due to the private beta phase and the recent 1.0 public release, lots of people are eager to test this out. Just look at all those emoji reactions. 🚀 IMHO it makes sense to have an acceptable expression in unstable ASAP and fix minor issues later.

Agreed, but I would also think it a good idea to mark the expression as unfinished and prevent it from going into the next stable release until it's polished up and battle-tested, assuming that's possible.

Can provide an option to build without gtk? kde users may want

No. The GLFW frontend is missing many features and is intended only for a rapid edit/compile/test cycle for developers. The macOS frontend only works on macOS, obviously. A native Qt frontend is possible, but that wildly out of the scope of a packaging request.

@jcollie can you fix the formatting issue please ?

Formatting fixed.

Can provide an option to build without gtk? kde users may want

No. The GLFW frontend is missing many features and is intended only for a rapid edit/compile/test cycle for developers. The macOS frontend only works on macOS, obviously. A native Qt frontend is possible, but that wildly out of the scope of a packaging request.

To make this more explicit this is a quote from mitchell below, and it will continue to be a developer only runtime

Note the GLFW build has bugs, memory corruption, crashes, and is missing dozens of features. It’s only used for Dev and isn’t suitable for daily use.

OK, I believe that I have addressed all of the requested changes at this point.

@ofborg build ghostty

@ofborg build ghostty ghostty.passthru.tests
@ofborg test allTerminfo

Thanks for your work here @jcollie, as well as the many reviewers! 🥳
I will be making a follow up PR to address some of the other suggestions here, hopefully followed by a backport to 24.05 and Darwin support
And obligatory mention: we ended up becoming the second most upvoted PR in Nixpkgs

Thanks for your work here @jcollie, as well as the many reviewers! 🥳
I will be making a follow up PR to address some of the other suggestions here, hopefully followed by a backport to 24.05 and Darwin support

I will be making a pr that hopefully adds darwin support but one of the things that need to be done first is swift 6 and 5.10 in nixpkgs then it will be possible.


createOptions needs proper documentation

Relevant Azure Service or Technology: IoT Edge Module
Published Documentation: https://docs.microsoft.com/en-us/azure/iot-edge/module-edgeagent-edgehub
Feedback:
There is zero documentation or examples from Microsoft on how to properly configure the createOptions feature to send flags to docker.  The current documentation links you directly to Docker's explanation of the "Create Container" properties, but the mapping between Microsoft's createOptions and Docker's properties are not entirely 1:1.
Please provide detailed documentation, along with proper examples, of the most used "docker run" parameters that createOptions supports, such as:

Mapping host port to container port
Mapping a host path to a container volume (do we use "Volumes {}" or "HostConfig { Binds [] }" ?)
Running a docker container as a non-priveleged user (instead of root)
Passing EULA, Billing, and ApiKey parameters for Microsoft Cognitive Services

Thank you.

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

ID: a79690c6-2784-a53e-7b34-6b428b01f9bf
Version Independent ID: b97c6e5f-323c-e7e5-b010-5c3e521935b1
Content: Properties of the agent and hub module twins - Azure IoT Edge
Content Source: articles/iot-edge/module-edgeagent-edgehub.md
Service: iot-edge
GitHub Login: @kgremban
Microsoft Alias: kgremban

@Tam66662 Thank you for your feedback, our team will further look into it and get back to you at the earliest.

@Tam66662  I have assigned the issue to the content author to evaluate and update as appropriate.

@Tam66662 Thanks for creating this issue, and especially thank you for including createOptions scenarios that you want to use. We've heard similar feedback from other users, and have plans to work on this content. I'll update this issue when there's something published for you to take a look at.

Adding on that I would like to see examples for mapping devices...for example a USB camera.

@kgremban Thanks for the doc update. Just wanted to check if thus issue can be closed.

@AshokPeddakotla-MSFT Thanks for the reminder.
@Tam66662 I added a new article providing some standard information about formatting createOptions, and samples from some common scenarios:  https://docs.microsoft.com/en-us/azure/iot-edge/how-to-use-create-options. This is definitely a work in progress, as we'll be building out the content to reflect additional scenarios (including @ckcampbell248's request for accessing external hardware) but I wanted to check in with you to see if this new article answers your core request for information about configuring and formatting create options?

@kgremban Thank you for doing this.  The link you provided was very helpful and informative and covers my core request.  I appreciate the new documentation!


General improvements to ResourceStore.

Some changes to get things working as they should do.

You're gonna need to commit a change to ppy/osu to fix the menu, but otherwise solid work.


usb: device: cdc_acm: send more than 1 byte in poll out

Schedule CDC ACM tx work to happen 1 ms after first unprocessed data write. This gives enough leeway for the task writing to the queue to write more than 1 byte before USB workqueue preempts and schedules IN transfer. Sending more than 1 byte at a time increases data throughput because transaction overhead remains the same regardless of packet size.
Prior to this change, virtually every IN transaction carried only one character when CDC ACM was used as a console.
Related to #52981
Fixes #52872

Tested on nRF5340, deferred logging throughput now reaching ~107KBps, minimal logging ~45KBps, increase from the highest before this fix of ~9KBps in deferred logging mode.
@xyzzy42 this should fix the issues you have seen

Only comment would be is if a "1ms" delay is acceptable, for the majority of people, it's not an issue, but 1ms is not guaranteed to be 1ms, and for some applications that need speed of data over throughput, is this going to cause them problems? FTDI's driver (at least in windows) allows control of this per connected device, to favour throughput OR latency.

I wonder if "panic" mode is affected?  Normally, the log backend switches from async mode to polled mode with a normal uart when panic is set.  I imagine the reason is so logs might still go out if scheduling is broken or the CPU is halted or reset as soon as the panic log is sent, synchronously with poll mode, out the uart.  Which probably doesn't really work on USB anyway, even before this change to add a delay.
I fixed this problem for myself by adding interrupt-driven UART mode support into the logging uart backend.  I can compare to this fix, but I think performance will be very similar between the two.

Only comment would be is if a "1ms" delay is acceptable, for the majority of people, it's not an issue, but 1ms is not guaranteed to be 1ms, and for some applications that need speed of data over throughput, is this going to cause them problems?

I guess by "speed of data" you mean latency, because by reducing latency you inevitably lower the amount of data you can send in given time interval (due to overhead and the fact that all USB communication is always initiated by host). I think expecting really low latency on USB is unreasonable, it is not low-latency medium.
I don't think the delay is going to cause problems other than eventually uncovering that the CDC ACM poll out implementation is not blocking as it should be according to uart_poll_out documentation.
https://github.com/zephyrproject-rtos/zephyr/blob/d46b9bd124119b9a8809c6e25acbfb175f5b221b/include/zephyr/drivers/uart.h#L561-L567

FTDI's driver (at least in windows) allows control of this per connected device, to favour throughput OR latency.

This is achieved by setting the latency in FTDI device using USB control transfer. When the latency timer expires in FTDI chip, it arms the IN bulk endpoint with the modem status lines status (2 bytes) and (if any) actual data. If latency timer does not expire, then the IN bulk endpoint is only armed once the packet would be Max Packet Size (i.e. Max Packet Size - 2 bytes payload data is collected in FIFO).
Arming IN endpoint is the only a part of latency issue on which the device has control. The other part of the latency is related to when host issues IN transaction, which is completely independent from the device (and forcing URB every 1 payload byte is really wasteful).

I wonder if "panic" mode is affected? Normally, the log backend switches from async mode to polled mode with a normal uart when panic is set. I imagine the reason is so logs might still go out if scheduling is broken or the CPU is halted or reset as soon as the panic log is sent, synchronously with poll mode, out the uart. Which probably doesn't really work on USB anyway, even before this change to add a delay.

No, this would be unaffected (i.e. it didn't work before and won't work after) because the actual transmission was handled by workqueue. This PR only prevents the workqueue from immediately preempting virtually every character write.

Codecov Report

Merging #53003 (d46b9bd) into main (0a02a4a) will increase coverage by 0.06%.
The diff coverage is 100.00%.

:exclamation: Current head d46b9bd differs from pull request most recent head f873091. Consider uploading reports for the commit f873091 to get more accurate results

@@            Coverage Diff             @@
##             main   #53003      +/-   ##
==========================================
+ Coverage   50.51%   50.57%   +0.06%
==========================================
  Files         713      712       -1
  Lines       90144    90019     -125
  Branches    21290    21229      -61
==========================================
- Hits        45533    45531       -2
+ Misses      36895    36804      -91
+ Partials     7716     7684      -32

Impacted Files
Coverage Δ

drivers/eeprom/eeprom_at2x.c
67.52% <ø> (ø)

drivers/pcie/host/pcie.c
30.72% <ø> (ø)

drivers/fuel_gauge/sbs_gauge/sbs_gauge.c
91.30% <100.00%> (+4.73%)
:arrow_up:

drivers/sensor/bmi160/bmi160.c
32.94% <100.00%> (ø)

subsys/fs/fs_impl.c
40.00% <0.00%> (-20.00%)
:arrow_down:

subsys/fs/littlefs_fs.c
50.78% <0.00%> (-19.69%)
:arrow_down:

modules/littlefs/zephyr_lfs_config.h
68.96% <0.00%> (-13.80%)
:arrow_down:

include/zephyr/sys/util.h
90.00% <0.00%> (-10.00%)
:arrow_down:

kernel/events.c
67.00% <0.00%> (-5.05%)
:arrow_down:

kernel/queue.c
90.34% <0.00%> (-2.07%)
:arrow_down:

... and 44 more

Continue to review full report at Codecov.

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

On a nRF52480, with a USB 2.0 hub (for power) between the host and bus, I get, sustained, with deferred logging.

50 KB/sec with this PR.  Yes, multiple bytes per URB are sent.  It's ~2 KB/sec without.
105 kB/sec with my interrupt-driven log backend uart.

So directly supporting the FIFO concept is somewhat better.
There is a much bigger problem.
I also have a shell running on a different USB CDC ACM endpoint.  With this PR, that ACM endpoint stops working once the other endpoint starts log TX at high speed.  The interrupt-driven support works fine with both ACM endpoints and logging at double the rate.

I guess by "speed of data" you mean latency, because by reducing latency you inevitably lower the amount of data you can send in given time interval (due to overhead and the fact that all USB communication is always initiated by host). I think expecting really low latency on USB is unreasonable, it is not low-latency medium.

IMHO, a better way to measure would be to look at command-response transaction rate.  Send a byte from host to device.  When the device gets the byte it sends another byte back to host.  Host gets that byte and then sends another, etc.  It's like sending commands over a UART to the device and waiting for responses and seeing what kind of throughput you can achieve.  If the commands are fast, the latency hit for each command ends up creating the throughput limit.
I think that's where the extra 1 ms would show up.
That said, we do have a client with a device that uses Nordic ESB to send data, in one direction only, to another device to act as an ESB to USB gateway and they are very concerned about latency.  USB is far from an ideal low latency interface here, but there are not a lot of other options in this space when you take things like custom PCI-Express expansion cards off the table.

I also have a shell running on a different USB CDC ACM endpoint. With this PR, that ACM endpoint stops working once the other endpoint starts log TX at high speed. The interrupt-driven support works fine with both ACM endpoints and logging at double the rate.

What do you mean by stops working? Is it entering an endless log loop (see #53032)? Or does it drop data (due to the non-blocking nature of the way ringbuf is used in CDC ACM, which is wrong imho, but seems to be there for some reason)?

IMHO, a better way to measure would be to look at command-response transaction rate. Send a byte from host to device. When the device gets the byte it sends another byte back to host. Host gets that byte and then sends another, etc. It's like sending commands over a UART to the device and waiting for responses and seeing what kind of throughput you can achieve. If the commands are fast, the latency hit for each command ends up creating the throughput limit.

This sounds like an artificial benchmark to me. Make the payloads more realistic, e.g. 10 bytes long command and response, and you'll see drastically different results.

That said, we do have a client with a device that uses Nordic ESB to send data, in one direction only, to another device to act as an ESB to USB gateway and they are very concerned about latency. USB is far from an ideal low latency interface here, but there are not a lot of other options in this space when you take things like custom PCI-Express expansion cards off the table.

Unless the client is always sending one byte payloads, I can't foresee a real degradation due to this change. In fact, this is likely to help due to significantly reduced CPU usage when payload is larger than 1 byte. Measure how much time is spent in USB workqueue with and without this change to get the feeling of how much overhead there is.

I also have a shell running on a different USB CDC ACM endpoint. With this PR, that ACM endpoint stops working once the other endpoint starts log TX at high speed. The interrupt-driven support works fine with both ACM endpoints and logging at double the rate.

What do you mean by stops working? Is it entering an endless log loop (see #53032)? Or does it drop data (due to the non-blocking nature of the way ringbuf is used in CDC ACM, which is wrong imho, but seems to be there for some reason)?

Since the test breaks my logging, it's hard to tell what broke exactly!  The console no longer responds.  No echo back and it doesn't act on commands, even without uart output, either.  I can see from a USB trace on the host side that the bulk out URB sending data data to the console completes.  The bulk in URB expected immediately afterward from the echo back never happens.
I have USB on it's own queue, not the system queue.  Both endpoints would share the single USB queue.  I suspect that's where the issue is.  Some sort of "never get to the front of the queue" problem on the other endpoint's work.  It's easy to see that the hardware and USB driver, via the interrupt-driven mode logging backend, can handle double the data rate with the same endpoints with a problem.

Since the test breaks my logging, it's hard to tell what broke exactly! The console no longer responds. No echo back and it doesn't act on commands, even without uart output, either. I can see from a USB trace on the host side that the bulk out URB sending data data to the console completes. The bulk in URB expected immediately afterward from the echo back never happens.

Do you use uart_irq_callback_user_data_set? Can you share the sample?

@trentp-igor When using two CDC ACM instances, one for console and one for shell, I can get the shell to stop working by starving the thread. Otherwise, I can get both logger and console to stop working if I close CDC ACM logging port and reopen it. The root cause (not yet identified, I am on it) might be the same in your case, but it might be something different as well.

This sounds like an artificial benchmark to me. Make the payloads more realistic, e.g. 10 bytes long command and response, and you'll see drastically different results.

I imagine the payloads don't need to get very long before the efficiency improvement offered by multi-byte USB URBs exceeds the reduced channel utilization due to more latency.  Under 10 bytes, going by how many URBs per 1 ms seem to be possible.
But if someone cared about throughput, they really should be using interrupt-driven or async mode anyway.  The polling uart interface is fundamentally less than ideal for this purpose.
The app I'm using runs on custom hardware.  But I need to debug another problem on a dev board that can be probed so I'll see if I can make a minimal example. Which will be more useful anyway.  AFAIK, spew deferred logs from main() while also having a shell on another CDC ACM uart is all that is needed.  But maybe the ADC on a SPI interface is somehow needed in some bizarre twist?

I imagine the payloads don't need to get very long before the efficiency improvement offered by multi-byte USB URBs exceeds the reduced channel utilization due to more latency. Under 10 bytes, going by how many URBs per 1 ms seem to be possible.

I wouldn't be surprised if you could observe efficiency improvement already when payload is 2 bytes...
For full-speed, the absolute maximum is 19 URBs per 1 ms regardless of the data size you send. Note that this absolute maximum is unachievable unless you have dedicated host controller for that particular device and the target never NAKs a single IN transaction (which is pretty much impossible if target USB device peripheral does not support dual buffering) and host is fast enough to process the URBs.

The app I'm using runs on custom hardware. But I need to debug another problem on a dev board that can be probed so I'll see if I can make a minimal example. Which will be more useful anyway. AFAIK, spew deferred logs from main() while also having a shell on another CDC ACM uart is all that is needed. But maybe the ADC on a SPI interface is somehow needed in some bizarre twist?

main() default priority is higher than shell default priority, so that can starve the shell. However, other than starving the shell thread in a way such that the handler for signal raised in https://github.com/zephyrproject-rtos/zephyr/blob/8bc094610c5dd69f6ba0085fb3fe7d18167164c9/subsys/shell/shell.c#L1154-L1157 is never called, I cannot get the shell to die no matter how much I write on the other CDC ACM interface.
Can you also reproduce the shell issue when shell thread priority is higher than default (enable priority override with SHELL_THREAD_PRIORITY_OVERRIDE Kconfig option and set priority with SHELL_THREAD_PRIORITY Kconfig option)?

On a nRF52480, with a USB 2.0 hub (for power) between the host and bus, I get, sustained, with deferred logging.
* 50 KB/sec with this PR.  Yes, multiple bytes per URB are sent.  It's ~2 KB/sec without.

* 105 kB/sec with my interrupt-driven log backend uart.

So directly supporting the FIFO concept is somewhat better.

Yes, it is because you waste less less time by sending less than Max Packet Size packets (i.e. the send is only scheduled after cdc_acm_fifo_fill() finishes writing the data) and waste less cpu time in actually writing to the ringbuffer (it does start playing a role). Increase the latency from K_MSEC(1) to K_MSEC(2) to see the speed go higher (at the cost of latency when just a single byte is sent). Note that with 2 ms, I still don't get Max Packet Size data packets, so it is still CPU limited, not bus limited.

The K_MSEC(1) is not really that bad from latency perspective. Without this PR, I could get a 1 byte payload on nRF52840DK CDC ACM IN endpoint (note that this is with application not doing anything useful!) on average every 0.34 ms. There is significant number of NAKed IN transactions in between the 1 byte payload data packets. This clearly shows that the bandwidth is limited due to device CPU processing power and not due to the USB bus.
This PR effectively reduces the latency if the payload is more than 2 bytes and the host does not individually process the bytes, e.g. like real-time MIDI messages on serial MIDI do. It does so thanks to significantly reduced CPU processing.

Raising the shell priority (to a lesser number) so that it is higher than the logging thread allows the shell to work again at high log rates.  The significant CPU usage report is: shell_uart (13) 0%, usbworkq (-1) 10%, main (0) 4%, and logging (14) 63%.
So it's CPU bound, primarily stuffing bytes into the USB queue one at a time.  Shell was the only thing affected because logging was already the 2nd lowest priority.
Using interrupt-driven mode for logging reduces usage to: shell_uart 0%, usbworkq 18%, main 5%, logging 18%, idle 38%.  The logging thread now blocks waiting for USB to get the URBs out.

With unmodified zephyr, shell and logging are equal priority (lowest) and we have: shell_uart 0%, usbworkq 51%, main 4%, logging 10%.  Almost no idle time.
If I adjust logging thread to be a higher priority than shell it causes the shell lockup.
So it's CPU bound between usbworkq and logging, with no blocking on the hardware.  But it is interesting, that changing the way items are added to the usb work queue causes the shell to get CPU time with equal priority to logging thread vs needing a higher priority to get CPU time.
I would have expected two equal priority threads to both get some share when all higher priority threads have blocked.
My code for interrupt-driven mode has two flaws:

UART interrupt-driven API support is optional in a UART driver, but there is no workable way to detect its presence.  uart_irq_callback_user_data_set() returns void.  The ASYNC UART API is also optional, but uart_callback_set() returns -ENOSYS so this can be detected.  Seems like a flaw in the UART APIs to me.
The cdc acm in interrupt-driven mode will block forever after one interrupt if no host is connected.  I don't think it should do this.  There seems no good way to deal with it.  I have the backend just wait a while and then drop a message if there are no interrupts.

My code for interrupt-driven mode has two flaws:

Okay, its more OT, please open a PR or discussion for your concern, I am locking the conversation here.

It is surprising how without this PR the shell could work,

Actually not, it does not use poll API.

Taking things out of context leads to simple but incorrect answers. Shell doesn't but logging does use poll API. The context was that there were two CDC ACM instances, one used for logging (poll API) and one used for shell and that this PR in such situation would starve shell, but wouldn't starve it without this PR. My suspicion is that the change is related to the fact that k_work_submit_to_queue calls z_reschedule_unlocked, but k_work_schedule_for_queue doesn't even if called with K_NO_WAIT.

It is surprising how without this PR the shell could work,

Actually not, it does not use poll API.

Taking things out of context leads to simple but incorrect answers. Shell doesn't but logging does use poll API.

Logging uses poll if ASYNC API is not available, or IIRC shell is not enabled, but probably not if there are two instances.

The context was that there were two CDC ACM instances, one used for logging (poll API) and one used for shell and that this PR in such situation would starve shell, but wouldn't starve it without this PR.

Sorry, I may not be able to filter out the relevant parts of many OT, but the two statements confuse me It is surprising how without this PR the shell could work, and but wouldn't starve it without this PR, what have I missed?

Sorry, I may not be able to filter out the relevant parts of many OT, but the two statements confuse me It is surprising how without this PR the shell could work, and but wouldn't starve it without this PR, what have I missed?

There is application with two CDC ACM instances (used simultaneously, i.e. appearing as separate ttyACM/COM ports):

one CDC ACM instance used by shell thread (using cdc_acm_fifo_fill)
another CDC ACM instance used by logging thread (using cdc_acm_poll_out)

And now there are two builds:

one with this PR merged - where the shell "stops working", which was resolved to "shell thread is starved"
one without this PR merged, otherwise the same - where the shell works just fine (and therefore shell thread is not starved)

The "Actually not, it does not use poll API." in no way explains the surprising starvation. The starvation is surprising because in both builds the shell was running at the same priority as logging thread, and with this PR the USB workqueue uses significantly less CPU time leaving more processing power available to other thread. The only suspicion right now is that it is somehow related to the fact that k_work_schedule_for_queue does not call z_reschedule_unlocked like k_work_submit_to_queue does.


36 import pydantic dataclasses and exceptions in namespace

Add exception info to docstrings and export pydantic.dataclasses.dataclass and pydantic.ValidationError

I tried to do a rebase but this made the mess only bigger :(
This PR does not change any code, just docstrings, docs and rephrasing of some imports.


Refactor WriteAttribute \ AddHtmlAttribute

Fixes #177

:watch:

To fulfill the purpose of the issue we should be conditionally generating the instrumented bits (value length, value offset etc.) based on instrumentation.
:watch:

@NTaylorMullen The primary issue with conditionally generating these values is that we'll have to factor it in the page cache invalidation which is more work than it needs to be. Right now, we always generate it instrumented with the assumption that having no-op instrumentation methods and parameters is very cheap.
I've updated the work item to reflect this design choice.

:shipit:


[DB] Unnecessary searchGetIds

In some places searchGetIds are redundant because it's already validated.

You can mention where this happens in the code here before starting to resolve them.


Noobie question about MSBuildForUnity

Hello everyone I wondering if is it possible to use MSBuildForUnity and Fody.
I have created a .csproj file under Assets/Scripts/Library
added :
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="Fody" Version="6.0.3"/>
        <PackageReference Include="MethodTimer.Fody" Version="3.1.0"/>
    </ItemGroup>
</Project>

But it throws:
PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Library.dll included for the current platform. Only one assembly with the same name is allowed per platform. Assembly paths: Assets/Scripts/Library/bin/Debug/netstandard2.0/Library.dll, Assets/Scripts/Library/obj/Debug/netstandard2.0/Library.dll

In fact I'm looking for a tool that would allow me to use weaving code on unity, like Fody
Thanks for reply

Have a look at https://github.com/ExtendRealityLtd/Malimbe/.
I'd love to kill that project if MSBuildForUnity has a way to allow using Fody directly instead :)

Thanks for this reference I will try it soon as possible.
Closing this issue.

You should definitely be able to use Fody with MSBuildForUnity. In the case described above by @loic-lopez, the problem is that by default, the build for csproj puts the compiled dll in both the obj directory and the bin directory, and so Unity sees it twice and doesn't know how to handle it. There are a couple ways to deal with this, but the simplest is to put the project in a directory that Unity won't process. To do this, you can either:

Put the csproj in a directory that starts with a . (Unity ignores these). Check out the current sample project for this route: https://github.com/microsoft/MSBuildForUnity/tree/master/Source/MSBuildTools.Unity/Assets/Samples
Move the csproj outside of the Unity project's Assets directory, and set the  in the csproj to be a directory under Assets. This way, the final outputs (normally in the bin directory) will be pushed into the Unity project.

@andreiborodin is doing a bunch of work on the project generation side that will make this easier. The generated projects ultimately will be used for both consuming dependencies - ProjectReference (MSBuild project) or PackageReference (NuGet package). We'll have more samples demonstrating this soonish.

Thanks @ryantrem, I will wait for your samples 🥇

#35 Has just been put in, there are now two samples linked from the main readme:
https://github.com/microsoft/MSBuildForUnity/#msbuildforunity
Tagging for notification. @loic-lopez, @bddckr

Also in theory I should be able to use the Fody library through this example:
https://github.com/microsoft/MSBuildForUnity/tree/master/Samples/SimpleNuGetDependency.Unity

@andreiborodin Thanks, but the two links are broken in the readme.
https://github.com/microsoft/MSBuildForUnity/blob/master/Samples/SimpleNuGetDependency.Unity/Readme.md
https://github.com/microsoft/MSBuildForUnity/blob/master/Samples/IntegratedDependencies.Unity/Readme.md

Oh wow, GitHub is case sensitive on that link for "README.md", will update.

Also in theory I should be able to use the Fody library through this example:
https://github.com/microsoft/MSBuildForUnity/tree/master/Samples/SimpleNuGetDependency.Unity
I would like to do something like that with Fody in a MonoBehaviour:
public class MyBehaviour : MonoBehaviour
{
[Time]
public void MyMethod()
{
//Some code u are curious how long it takes
Console.WriteLine("Hello");
}
}
Ref: Fody/MethodTimer
Thanks for your help.

Ok, so I am not very familiar with Fody, however, as I understand it's two NuGet packages and then a special compilation step that replaces default source compilation?
We currently let Unity compile our scripts, however, we in the https://github.com/microsoft/MSBuildForUnity/tree/master/Samples/IntegratedDependencies.Unity sample we do setup C# projects for asmdefs in the repo that reference all the Unity libraries.
I think you can craft a special C# project based on the AsmDef generated projects. It references generated .g.props and g.targets that will be geneerated when you open the Editor. Those generated props/targets reference Unity libraries and can allow you to build Unity scripts outside of Unity.
This special crafted project with it's script should be invisible to Unity, so either outside of Assets or in a folder that is prefixed with a dot '.' in the assets folder.
You can then reference that project from Dependencies.msb4u.csproj.
You will need to have Auto Generation Enabled for this, so start with IntegratedDependencies.msb4u sample.

@andreiborodin yes Fody will weave assemblies after the dll are generated.
I will try the IntegratedDependencies.Unity so.

So that what I was trying to say in my longer post above. The IntegratedDependencies.Unity generates the C# Projects and Solution that can be used to build compiled Unity binaries outside of Unity editor.
So, you can do the same for your code, and have it live outside of Unity, and as long as it references the same imports as the generated props, it should build.
I will see if I can find sometime and hack up a C# project for you.

I managed to hack up some stuff quickly, @loic-lopez  I have a PR for you here: #61
There are two very similar C# projects that are of interest to you:

CustomUnityBuild
CustomUnityBuild.Player

You can find notes in them that I added, they are prefixed "anborod NOTE::"
They both reference the same source file under .src folder (invisible to Unity) which is in fact a Unity MonoBehaviour.
These projects get build by Unity, and then they rely on current Editor's very own DLLs to build against and place the output into Unity.
Caveat! I had to check-in the meta files, as I couldn't properly hook into our metafilegenerator (there is a task on us to reconcile this). There are two being produced.
Additionally, I have to have two projects to build current platform editor version and player version, we will support a better way in the future.
Finally, any NuGet referenced by these projects will be brought in regardless if any other project file in Unity references the same NuGet package already.
Hopefully this get's you started.

@andreiborodin thanks for your help I will try out your PR as soon as possible!

@andreiborodin I have encountered multiple issue when building the IntegratedDependencies.Unity on Unity 2018.4.12
example:
MSBuildForUnity\Samples\IntegratedDependencies.Unity\Assets\CustomUnityBuild\CustomUnityBuild.csproj(54,3): error MSB4019: The imported project "C:\.InEditor.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk

MSBuildForUnity\Samples\IntegratedDependencies.Unity\Assets\CustomUnityBuild\CustomUnityBuild.Player.csproj(64,3): error MSB4019: The imported project "C:\.Player.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

MSBuildForUnity\Samples\IntegratedDependencies.Unity\Assets\Dependencies.msb4u.csproj(33,3): error MSB4019: The imported project "C:\Dependencies.msb4u.g.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Sorry if I miss something I'm very not familiar with msbuild.

Did you try opening the Unity solution first?

Also, there was a bug that I fixed in master, so I updated the branch.

@andreiborodin Hi again, so I pulled your update and there is other issues on Unity startup:
System.NullReferenceException: Object reference not set to an instance of an object
  at Microsoft.Build.Unity.ProjectGeneration.Exporters.TemplatedProjectExporter.ProcessPlatformTemplate (Microsoft.Build.Unity.ProjectGeneration.Templates.ITemplatePart rootPart, Microsoft.Build.Unity.ProjectGeneration.Templates.TemplateReplacementSet rootReplacementSet, System.String platformName, System.String configuration, UnityEditor.BuildTarget buildTarget, Microsoft.Build.Unity.ProjectGeneration.TargetFramework targetFramework, System.Collections.Generic.IEnumerable`1[T] references, System.Collections.Generic.IEnumerable`1[T] defines, System.Collections.Generic.HashSet`1[System.String][] priorToCheck) [0x000da] in C:\Users\LoicL\Desktop\MSBuildForUnity\Source\MSBuildTools.Unity\Packages\com.microsoft.msbuildforunity\Editor\ProjectGenerator\Scripts\Exporters\TemplatedProjectExporter.cs:534
  at Microsoft.Build.Unity.ProjectGeneration.Exporters.TemplatedProjectExporter.ExportPlatformPropsFile (Microsoft.Build.Unity.ProjectGeneration.CompilationPlatformInfo platform, System.Boolean inEditorConfiguration) [0x000a2] in C:\Users\LoicL\Desktop\MSBuildForUnity\Source\MSBuildTools.Unity\Packages\com.microsoft.msbuildforunity\Editor\ProjectGenerator\Scripts\Exporters\TemplatedProjectExporter.cs:504
  at Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.ExportCoreUnityPropFiles () [0x00029] in C:\Users\LoicL\Desktop\MSBuildForUnity\Source\MSBuildTools.Unity\Packages\com.microsoft.msbuildforunity\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:169
  at Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.RegenerateEverything (System.Boolean reparseUnityData) [0x000da] in C:\Users\LoicL\Desktop\MSBuildForUnity\Source\MSBuildTools.Unity\Packages\com.microsoft.msbuildforunity\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:206
  at Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.RunCoreAutoGenerate (System.Boolean skipTokenFileCheck) [0x0003b] in C:\Users\LoicL\Desktop\MSBuildForUnity\Source\MSBuildTools.Unity\Packages\com.microsoft.msbuildforunity\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:154
  at Microsoft.Build.Unity.ProjectGeneration.MSBuildTools..cctor () [0x0006f] in C:\Users\LoicL\Desktop\MSBuildForUnity\Source\MSBuildTools.Unity\Packages\com.microsoft.msbuildforunity\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:138
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])

Win32Exception: ApplicationName='dotnet', CommandLine='msbuild CustomUnityBuild.csproj -restore  -v:minimal -p:NuGetInteractive=true  -t:Build -p:Configuration=Release -nologo', CurrentDirectory='C:\Users\LoicL\Desktop\MSBuildForUnity\Samples\IntegratedDependencies.Unity\Assets\CustomUnityBuild', Native error= Le fichier spécifié est introuvable.

System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <9f8c4786222746238eb929db40bf8dd1>:0)
System.Diagnostics.Process.Start () (at <9f8c4786222746238eb929db40bf8dd1>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
Microsoft.Build.Unity.MSBuildProjectBuilder+<ExecuteMSBuildAsync>d__17.MoveNext () (at C:/Users/LoicL/Desktop/MSBuildForUnity/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:452)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () (at <599589bf4ce248909b8a14cbe4a2034e>:0)
Microsoft.Build.Unity.MSBuildProjectBuilder+<BuildProjectAsync>d__16.MoveNext () (at C:/Users/LoicL/Desktop/MSBuildForUnity/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:396)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () (at <599589bf4ce248909b8a14cbe4a2034e>:0)
Microsoft.Build.Unity.MSBuildProjectBuilder+<BuildProjectsAsync>d__10.MoveNext () (at C:/Users/LoicL/Desktop/MSBuildForUnity/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:289)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () (at <599589bf4ce248909b8a14cbe4a2034e>:0)
Microsoft.Build.Unity.MSBuildProjectBuilder.BuildProjects (System.Collections.Generic.IReadOnlyCollection`1[T] msBuildProjectReferences, System.String profile, System.String additionalArguments) (at C:/Users/LoicL/Desktop/MSBuildForUnity/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectBuilder/MSBuildProjectBuilder.cs:203)
Microsoft.Build.Unity.MSBuildProjectBuilder+BuildOnLoad.BuildAllAutoBuiltProjects () (at C:/Users/LoicL/Desktop/MSBuildForUnity/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectBuilder/MSBuildProjectBuilderEditor.cs:109)
Microsoft.Build.Unity.MSBuildProjectBuilder+BuildOnLoad+<>c.<.cctor>g__OnUpdate|0_0 () (at C:/Users/LoicL/Desktop/MSBuildForUnity/Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectBuilder/MSBuildProjectBuilderEditor.cs:93)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:303)

These issues are also displayed when I try to Build All Projects in the MSBuild menu.

So after compiling mannually the CustomUnityBuild.csproj I was able to add Fody and MethodTimer.Fody to the deps:
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using MethodTimer;
using UnityEngine;

public class ExternalMonoBehaviour : MonoBehaviour
{
    // Start is called before the first frame update
    [Time]
    void Start()
    {
        Debug.Log(typeof(ExternalMonoBehaviour).BaseType.FullName);
    }
}

public static class MethodTimeLogger
{
    public static void Log(MethodBase methodBase, long milliseconds, string message)
    {
        Debug.Log("FROM WEAVING");
    }
}

And the console print:

So Fody is weaving the assembly pretty well!

Awesome of the result, but could you tell me if you are still able to repro the Unity editor issues. If you check-in your changes to the proj file, do a git clean, and then open Unity again, what do you get?
I would like to work out those kinks.

@andreiborodin I always use the Unity editor, and also I have pulled the latest change on the custom branch.

Ok, well just to be pedantic I will try that again, but I have been doing various testing and not seeing anything regarding failing to parse the template.
I wonder if there is something about my context that is different from yours, one you said you re-installed VS and that changed the behavior.
I appreciate you trying this and finding issues, it helps me fix the few issues.

Thanks you again for helping me to integrate Fody.

Closing this issue, opened another issue to track supporting this concrete scenario.


Reduce the amount of data in the na_example docker image

Decided to leave all the wordlists in the docker image and instead reduce the default amount that is loaded (that way people can scale it up if they so desire).


Old fleet-crd chart in fleet-system

Rancher Server Setup

Rancher version: 2.7.9
Installation option (Docker install/Helm Chart): Helm Chart

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): RKE1

Proxy/Cert Details:

Information about the Cluster

Kubernetes version: 1.26.8
Cluster Type (Local/Downstream): Local

User Information

What is the role of the user logged in? Admin

Describe the bug
When checking deprecated API whith kubent, I find old fleet CRD :
$ kubent
8:59AM INF >>> Kube No Trouble `kubent` <<<
8:59AM INF version 0.7.0 (git sha d1bb4e5fd6550b533b2013671aa8419d923ee042)
8:59AM INF Initializing collectors and retrieving data
8:59AM INF Target K8s version is 1.26.8
8:59AM INF Retrieved 60 resources from collector name=Cluster
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM WRN failed to discover supported resources for apiextensions.k8s.io/v1beta1: the server could not find the requested resource
8:59AM INF Retrieved 244 resources from collector name="Helm v3"
8:59AM INF Loaded ruleset name=custom.rego.tmpl
8:59AM INF Loaded ruleset name=deprecated-1-16.rego
8:59AM INF Loaded ruleset name=deprecated-1-22.rego
8:59AM INF Loaded ruleset name=deprecated-1-25.rego
8:59AM INF Loaded ruleset name=deprecated-1-26.rego
8:59AM INF Loaded ruleset name=deprecated-future.rego
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.22 <<<
------------------------------------------------------------------------------------------
KIND                       NAMESPACE     NAME                                        API_VERSION                         REPLACE_WITH (SINCE)
ClusterRoleBinding         <undefined>   cattle-admin-binding                        rbac.authorization.k8s.io/v1beta1   rbac.authorization.k8s.io/v1 (1.8.0)
CustomResourceDefinition   <undefined>   bundledeployments.fleet.cattle.io           apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   bundlenamespacemappings.fleet.cattle.io     apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   bundles.fleet.cattle.io                     apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   clustergroups.fleet.cattle.io               apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   clusterregistrations.fleet.cattle.io        apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   clusterregistrationtokens.fleet.cattle.io   apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   clusters.fleet.cattle.io                    apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   contents.fleet.cattle.io                    apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   gitjobs.gitjob.cattle.io                    apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   gitreporestrictions.fleet.cattle.io         apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)
CustomResourceDefinition   <undefined>   gitrepos.fleet.cattle.io                    apiextensions.k8s.io/v1beta1        apiextensions.k8s.io/v1 (1.16.0)

After investigation, fleet-crd is installed with Helm Chart in two namespace :

fleet-system : fleet-crd:0.3.500
cattle-fleet-system : fleet-crd:102.2.0+up0.8.0

Kubent show deprecated API because of the old fleet-crd helm installation values stored in secret.
I don't kown in which rancher version the fleet installation changed from fleet-system to cattle-fleet-system.
Is it safe to remove fleet-crd in fleet-system namespace ?
To Reproduce

Result
Expected Result

Screenshots

Additional context

Its updated in rancher-2.6 onwards... see this: https://github.com/rancher/fleet/issues/395

Hi @skanakal , is it possible to move this issue to fleet project ? Thank you


passwordencryptedcode

Related Issue

This code is for password encryption (#1452 )
Proposed Changes
Solved the password encryption problem
added the code for the solution of password encryption problem

Additional Info
It is a password encrypted code in which if we enter a password it will not shown to us and we only see astrick and it will check to predefined password  and username if both are correct we are able to login.
Checklist

[x] ✅ My code follows the code style of this project.
[x] 📝 My change requires a change to the README.
[x] 🎀 I have updated the README accordingly.
[x] 👀 I have read the CONTRIBUTING document.
[x] ✨ I have added tests to cover my changes.
[x] 🚩 All new and existing tests passed.
[x] 🌟 ed the repo

Its output will look like this we can also change user name and password using this  code .

Incomplete description .

@Lakhankumawat please check this again

In which folder i put this code and update readme file of which folder?

In which folder i put this code and update readme file of which folder?

LGTM

Please @lakhankumavat review this tomorrow is the last date so please
review this pr and merge it
On Sun, 29 May 2022 at 8:11 PM, TRIDIB BAG @.***> wrote:

LGTM
—
Reply to this email directly, view it on GitHub
https://github.com/Lakhankumawat/LearnCPP/pull/1494#issuecomment-1140463328,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUU3UCBQTZLNNFYTWUZYZA3VMN6Z5ANCNFSM5WMI4CWQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


undo/redo copy and paste of a folder changes it to a file

Testing #111015
Ctrl C on the file copies it as expected
Ctrl V pastes the copy as expected
Ctrl Z removes the file as expected
Ctrl Y adds a file with the folder's name
Ctrl Z removes the file with the folder's name

Good catch, assigning to November to try to fix

I ahve have fixed this that it now brings back the folder, however the folder is empty which is captured via this issue https://github.com/microsoft/vscode/issues/111022

still getting a file instead of a folder when I undo and redo even though it says insiders released

@meganrogge  I justr tried latest insiders and it works for me. Here are my steps, let me know if you are using different steps:

Select a folder in the Explorer, Ctrl + C, Ctrl + V
Ctrl + Z -> Folder copy gets deleted
Ctrl + Y -> Folder gets brought back from trash as a folder


Opening a previously written draft containing HTML links will only retains plaintext (not links)

Hi all,
This is almost a duplicate of #3486 (slight different UX) and related to #2485.
So feel free to close it if it you consider it as a duplicate.
Solving one resolve the other I think.
Expected behavior
I open a draft in K9mail that was previously written by another email client (like Thunderbird) and that contains HTML links. I must be able to edit the draft mail in the existing HTML formating (not converting links to just plain text, losing url) or at least be warned that a convertion will happen and allow me to discard editing without any effect (but allow me to send the mail, with no convertion).
Actual behavior
I open a draft in K9mail that was previously written by another email client (like Thunderbird) and that contains HTML links. I loose HTML links formatted that are replaced by their text, loosing the URL information, without any warning. I cannot rollback the convertion effect, because when I leave the editor mode, it offers me to discard changes (but save the converted-to-plain-text version, not the original HTML one) or to suppress the draft. Neither option are OK or a good UX.
Steps to reproduce

Write an email in another email client (like Thunderbird) containing HTML links and save it to Draft folder
Open it with K9mail
See that it has been converted to a plain text version loosing HTML links url without any warning.
When leaving the editor mode, see that it can only keep the plain-text version or remove the draft.

Thanks
It is never said enought, so: THANK YOU all for this app!
Environment
K-9 Mail version: 5.403
Android version: 5.1.1
Account type (IMAP, POP3, WebDAV/Exchange): IMAP

K-9 Mail currently doesn't support rich text editing. See #1745.

Please reconsider evaluating this issue with regard to the thunderbird merge.


Read only AdminFlag

Fixes #164.

Adds a read-only admin flag which dooms the transaction
Adds request methods for admin flags (request.flags.enabled and request.flags.all)
Adds a AdminFlag.notify attribute to determine if the flag should be displayed as a notification bar
Shows a notification bar for any notifiable admin flags
Admin UI for editing flags

What's the behavior that users are going to see if they attempt to do something that writes to the DB when we're in read only mode?

@dstufft It will look like the write has succeeded, but it won't, and there will be a big red notification banner saying "Read Only Mode: Any write operations will have no effect"
We probably need to add a special case to fail upload since twine users won't see the notification banner.


v0.0.7 master branch: local variable 'timeout_task' referenced before assignment

I have tried to run Milabench cloned from the v0.0.7 master branch in a Conda environment. The code failed to run for almost all of the benchmarks with the same error message, for example:
$ milabench run --select resnet50
Traceback (most recent call last):
File "/gpfs/gibbs/project/hpcprog/pl543/milabench2/milabench/multi.py", line 177, in do_run
await exec_plan.execute("run", timeout=True, timeout_delay=600)
File "/gpfs/gibbs/project/hpcprog/pl543/milabench2/milabench/executors.py", line 140, in execute
timeout_task.cancel()
UnboundLocalError: local variable 'timeout_task' referenced before assignment
resnet50 UnboundLocalError: local variable 'timeout_task' referenced before assignment
Please take a look and let me know if you need further information.

Thank you for the issue,
A PR has been made to fix that particular issue.
Although it seems that this issue, is only partly the cause of the failure as at least one timeout_task should have been created for the benchmark.
milabench run --select resnet50 should be spawning one benchmark per gpu.
Are you running on a system with NVIDIA GPUs ?

Yes, I am running it on a system with NVIDIA GPUs. In particular, I have being using one A100 with 40G device memory.

Closing this, the root cause was addressed, feel free to reopen if the issue persists


SharedDateMiddleware fails with IsADirectory

Minimal example:
from flask import Flask
from werkzeug.middleware.shared_data import SharedDataMiddleware

app = Flask(__name__)
app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {'/': ('flask', 'json')})

This only seems to happen when using / with the tuple syntax to reference a package. When using another mapping like /test/ it works fine.
Traceback (most recent call last):
  File "/home/adrian/dev/flask-react-example/.venv/lib/python3.7/site-packages/flask/app.py", line 2328, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/adrian/dev/flask-react-example/.venv/lib/python3.7/site-packages/werkzeug/middleware/shared_data.py", line 231, in __call__
    f, mtime, file_size = file_loader()
  File "/home/adrian/dev/flask-react-example/.venv/lib/python3.7/site-packages/werkzeug/middleware/shared_data.py", line 132, in <lambda>
    open(filename, "rb"),
IsADirectoryError: [Errno 21] Is a directory: '/home/adrian/dev/flask-react-example/.venv/lib/python3.7/site-packages/flask/json/'

I get a completely different error:
Traceback (most recent call last):
  File "/home/david/Projects/werkzeug/src/werkzeug/serving.py", line 304, in run_wsgi
    execute(self.server.app)
  File "/home/david/Projects/werkzeug/src/werkzeug/serving.py", line 292, in execute
    application_iter = app(environ, start_response)
  File "/home/david/Projects/werkzeug/src/werkzeug/middleware/shared_data.py", line 214, in __call__
    real_filename, file_loader = loader(path[len(search_path) :])
  File "/home/david/Projects/werkzeug/src/werkzeug/middleware/shared_data.py", line 155, in loader
    if not provider.has_resource(path):
  File "/home/david/.virtualenvs/werkzeug/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1404, in has_resource
    return self._has(self._fn(self.module_path, resource_name))
  File "/home/david/.virtualenvs/werkzeug/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1473, in _has
    "Can't perform this operation for unregistered loader type"
NotImplementedError: Can't perform this operation for unregistered loader type

The error was because I was using ("werkzeug", "debug") and 0.16.x still has the weird module hack.
This seems to be expected, and it happens even with a /test/ prefix. You need to point to a file to serve, not the directory itself. This should probably return a 404 though.

That would mean that packages and normal filesystem paths have different locations - the latter do support pointing to a directory and I think it makes perfect sense that you point this middleware to a directory and not a file...

You do point at a directory, but it only serves files. If you go to the top level, you don't get a directory listing, you need to go to an actual file within the directory.

OK, after testing it again now I remember the exact issue:
Let's take this example:
from flask import Flask
from werkzeug.middleware.shared_data import SharedDataMiddleware

app = Flask(__name__)
app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {
    '/': ('flask', 'json'),
    '/test/': ('flask', 'json'),
    '/fs/': '/var/empty/',
})

http://localhost/: IsADirectoryError :x:
http://localhost/test/: IsADirectoryError :x:
http://localhost/fs/: 404 :heavy_check_mark:

IMO the first two options should 404 as well to be consistent and not cause an actual exception simply due to a client requesting that URL. 403 would probably be even more suitable for all cases since AFAIK that's what real webserver usually do when you attempt to access a directory that has no directory listing enabled.

Definitely agree they should raise 403/4 instead of 500, thanks for clarifying.

Due to the way the middleware works, we can't return 403 as unhandled paths are intended to pass through to the app, which is what's actually raising the 404. Would be too big a rewrite at this point to support 403.


Configuration ?

Hi There,
I am having a bit of trouble to configure the variables, the ReadMe is a bit light and I also cannot find any information about the SilverStripeS3AdapterTrait trait.
Where Am I supposed to setup AWS_REGION, AWS_BUCKET_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY? Is this going into the _config file, a yml?
Thank you.

You will want to setup those variables in your .env file locally. Then you can set your s3 client to connect using those by specifying it in your yaml config. Checkout https://github.com/silverstripe/silverstripe-s3/issues/26#issuecomment-505525388 for an example.


It is now known as "Azure Data Lake Storage".

The current name is "Azure Data Lake Storage".  "Azure Data Lake Store" was the previous name.

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

You can only sign off in the main PR conversation, not in review comments. In general, the creator of the PR should sign off, not the tech reviewer.


Update Set-SPIRMSettings.md

Update example and fill in placeholder text.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-server/Set-SPIRMSettings.md
:white_check_mark:Succeeded
View (sharepoint-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-server/Set-SPIRMSettings.md
:white_check_mark:Succeeded
View (sharepoint-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


How to stream audio only files?

Is it possible to stream audio only files (like *.mp3) using the client?
Using From file RTSP fails due to video gets always prepared in https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/04c76192c9e58daa7bb80afc885add45edd7051d/app/src/main/java/com/pedro/rtpstreamer/filestreamexample/RtspFromFileActivity.java#L163
This means audio files are not able to be streamed. Is there a way to disable the video functionalities and stream audio only?

Sounds very good! What do you think? How long do you need to implement the feature? Let me know if there is a way to give you some support by contribute something.

Feature added in library version 1.9.1
Now you only need prepare source that you will use. In your case only prepareAudio need be called.
Test it and let me know if work for you.

Thanks for this fast implementation. I've updated the sample app for playing audio files in #667 . Basically it works like expected but I am struggeling with the audio quality of streamed mp3 files. The audio quality of the received stream is very very bad ... Do you have an idea what could be the problem? Maybe you are able to reproduce the probuem using the sample app?

Update: For me it seems to be an issue with the decoder.

Using AAC source file --> Good quality
Using MP3 source file --> Bad quality
Using WAV source file --> Even worse quality

Do you have an idea how to set up the decoder to allow smooth streaming?

Hi,
I will check it. I assume that you tested with 2 or more files with that formats to discard specific file configuration. Anyway, if you can, share me a file in both formats to test it.
About your PR I will check it and merge later

Sure I've tested several different files, the result is basically always the same. I've packed some test files which may help you to reproduce the problem. You can download them at this link. Thanks for your great support.

wav and mp3 files fixed here:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/70be9c17d66a15d70ab7ec8150cd8366c84547e6
I tested with a few files in aac, mp4, wav and mp3. Let me know if you have problems with any file and share me it to fix.

Hi Pedro,
again: thanks for your fast implementation. *.wav and *.aac works fine for me, but *mp3 is failing due to some buffer overflow. This is the result using the *.mp3 which I've already uploaded in my previous comment. Here is the exception:
E/AndroidRuntime: FATAL EXCEPTION: BaseEncoder
    Process: com.pedro.rtpstreamer, PID: 16457
    java.nio.BufferOverflowException
        at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:298)
        at com.pedro.encoder.BaseEncoder.processInput(BaseEncoder.java:130)
        at com.pedro.encoder.BaseEncoder.inputAvailable(BaseEncoder.java:170)
        at com.pedro.encoder.BaseEncoder$2.onInputBufferAvailable(BaseEncoder.java:192)
        at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1738)
        at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1696)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:237)
        at android.os.HandlerThread.run(HandlerThread.java:67)
E/RtspClient: connection error
    java.net.SocketException: Socket closed
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:394)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
        at java.net.Socket.connect(Socket.java:621)
        at com.pedro.rtsp.rtsp.RtspClient$1.run(RtspClient.java:153)
        at java.lang.Thread.run(Thread.java:919)
I/ACodec: [OMX.SEC.mp3.dec] Now Executing->Idle
I/ACodec: [OMX.SEC.mp3.dec] Now Idle->Loaded
    [OMX.SEC.mp3.dec] Now Loaded
     [OMX.SEC.mp3.dec] Now kWhatShutdownCompleted event : 8508
I/AudioEncoder: stopped
I/MediaCodec: Codec shutdown complete
I/BaseDecoder: Decoder maybe was stopped
I/BaseDecoder: Decoding error
    java.lang.NullPointerException: Attempt to invoke virtual method 'long android.media.MediaExtractor.getSampleTime()' on a null object reference
        at com.pedro.encoder.input.decoder.AudioDecoder.decode(AudioDecoder.java:109)
        at com.pedro.encoder.input.decoder.BaseDecoder$1.run(BaseDecoder.java:96)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:237)
        at android.os.HandlerThread.run(HandlerThread.java:67)

It was working in my device maybe because in my encoder default input size is higher than in your encoder.
This should work now. Test it and let me know.

Nice, works perfectly now! Let me know if you are in germany some day, so I can invite you for a beer :-) ...
Not really a important use case for me, but I've noticed still a crash using a *.wma file (sample file):
E/AndroidRuntime: FATAL EXCEPTION: BaseEncoder
    Process: com.pedro.rtpstreamer, PID: 20745
    java.nio.BufferOverflowException
        at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:298)
        at com.pedro.encoder.BaseEncoder.processInput(BaseEncoder.java:130)
        at com.pedro.encoder.BaseEncoder.inputAvailable(BaseEncoder.java:170)
        at com.pedro.encoder.BaseEncoder$2.onInputBufferAvailable(BaseEncoder.java:192)
        at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1738)
        at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1696)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:237)
        at android.os.HandlerThread.run(HandlerThread.java:67)

Ok, I will keep in mind XD
crash fixed *.wma should work now.

Great, your the man. Works now. Thanks again!

Implemented


Changelog Needed

Please consider maintaining a simple Changelog, updated with each versioning increment.

Hi @johnculviner - Thank you for your project. Is it onerous to maintain a changelog per version? I think many more people than just me would really appreciate it.

Hi @mendeza, I will try to remember do that for future changes. For now you should be able to roughly refer to the commit history. Thanks for the feedback!


TypeScript: (re)enable possibility for declaration merge

Before version 3.2.1, it was possible to declare own validators and sanitizers via declaration merging, simply using something like this in a .d.ts file.
/// <reference types="express-validator" />
declare namespace ExpressValidator {
    interface Validator {
        isArrayOfInt(): this;
    }

    interface Sanitizer {
        toArrayOfInt(): this;
    }
}

I could not find a way, to achieve this with v.3.2.1 and furthermore no hints from Microsoft or any other resource how to extend interfaces from packages, using the export as namespace syntax.
// index.d.ts
// v.3.2.0 and before
declare module "express-validator" {
// snip...
}

// since v.3.2.1
export as namespace ExpressValidator;

If there is a way to declare custom handler, please provide some documentation, how to do so. Otherwise please consider to roll back to the old syntax as i can't see any advantages.

Can you try something like this commit?
a8dde3138b5edabfe12c318404f14c1d78205e32
The advantages are that you can now use ES6 import syntax instead of typescript syntax :)

Thanks for your help. Works like a charm.


Add TanOp to StableHLO Opset

RFC: https://github.com/openxla/stablehlo/pull/2101
This PR include

OP def
reference implementation, test cases
VHLO change and test cases

Requires version bump to v4, please refer to vhlo_checklist for required changes (VhloDialect.td comment / testing / etc.)

Thank you. updated PR with version bump and required changes. PTAL.


Removed CTS dependency. Issue - #1126. [WIP]

Contains
An attempt to fix #1126 . It's still slightly half baked - needs some more refinements before being merged though.
How to test
i) Run Terasology.
ii) Confirm that CTS is not required anymore on the main menu and is only initialized before the game starts (when it's really required).
Outstanding before merging
Don't merge yet
There's still quite a few things pending. I'm pushing this branch anyway, for a review and some more pointers and tips.

[x] CTS has been removed as a dependency from the menu
[ ] Keyboard bindings must be added to regain control of in-menu keyboard shortcuts (NUI editor, Console, etc.)
[ ] Refactor some more code which uses InputSystem arguments.
[ ] Figure out how to deal with the NPE thrown by isCaptureMouse() (called by NUIManagerInternal). [Line 91 of MenuInputSystem.java]
[ ] Figure out why the CrashReporter crashes the game. (Perhaps related to the NUIManagerInternal issue above?)

Tagging @emanuele3d and @Cervator for a review. Is there anything else apart from all that in the checklist that I need to consider? 😃

Can one of the admins please verify this patch?

@GooeyHub: ok to test
@zeokav: thanks for the PR and I think you got a good checklist. Just in case you might want to run with multiplayer (server+client and a 2nd client and/or headless + client) just to make sure there's no difference in behavior.
Will try to test it some when able to find some time :-)

Hooray Jenkins reported success with all tests good!

Poking @zeokav to see if more work is expected on this sometime :-)

@Cervator I've been pretty caught up with my internship and placements of late! But yes, I will get back to it once I get the time. 😃

@Cervator Free again! 😄 I'm sure that the code has gone through some changes over the summer. I think I'll close this branch and start fresh. Will save me from conflicts.


Go to Definition not working in stand alone cs file

Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003131)
Product Information:
Version:            1.0.0-preview2-003131
Commit SHA-1 hash:  635cf40e58
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.14393
OS Platform: Windows
RID:         win10-x64
VS Code version:
C# Extension version: 1.91
I have a stand alone .cs file with a class and some methods in it. Go to Definition doesn't seem to be working. I saw somewhere some comments about the feature requiring a project.json file, is that correct?
At first I thought this may have had something to do with the file not having been saved, but even after saving it, it still doesn't seem to work.
For some test data paste the below into a new window:
public class MyClass
{
    private void GetRecent()
    {
        // Get the thing
    }

    private void Load()
    {

        GetRecent();
    }
}

Click on the GetRecent call in the Load Method and then hit F12

In general, you'll need to have a project to get features like Go to Definition and IntelliSense working. It doesn't have to be a project.json file. A .csproj will work fine.
Making features work better in standalone files is on our backlog. We're tracking the work with https://github.com/OmniSharp/omnisharp-vscode/issues/47.

Thanks @DustinCampbell I can work with that. I've transitioned from Sublime for my everyday editor to VSCode, and I'm enjoying it so far, this was one of my few, small, gripes. Cheers.


SWC transpiling arrow functions as async *() =>  which breaks my build

Describe the bug
We started experiencing errors with the swc transpiling... from versions after 1.3.38
for some reason swc transpiles our arrow functions to async* arrow functions...
I couldn't reproduce it on a playground but any help would be nice 🙏
Input code
describe('Get Something', () => {
	it('should do something', () => {
		expect(true).toBeTrue()
	});
})

Config
{
  jsc: {
    parser: {
      syntax: 'typescript',
      decorators: true
    },
    transform: {
      legacyDecorator: true,
      decoratorMetadata: true
    },
    experimental: {
      // this is a workaround we use for esm->cjs compatibility https://github.com/swc-project/swc/issues/3843
      plugins: [['jest_workaround', {}]]
    }
  },
  module: {
    type: 'commonjs'
  }
}

Playground link
No response
Expected behavior
Should be transpiled into a regular arrow function e.g
describe('Get Something', () => {
...
});

Actual behavior
It gets tanspiled into
describe('Get Something', async *()=>{
...
});

which errors out...
Version
1.3.38
Additional context
I do remember seeing a PR in the changlog changing something to do with async* arrow functions but I couldn't find it right now...

Please provide playground link, or reproducible repo via gh or codesandbox or similar.


Docker compose integration

Hi all,
Is it possible/any attempt to deploy shipyard using docker-compose.yml?
Thanks in advance.

Yes, it should run.
On Thu, Jul 9, 2015 at 4:15 AM, mboussaa<EMAIL_ADDRESS>wrote:

Hi all,
Is it possible/any attempt to deploy shipyard using docker-compose.yml?
Thanks in advance.
—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/570.

Cool. I Will try to do it and give you feedback :-)

I wrote a docker-compose.yml
rethinkdb:
  image: shipyard/rethinkdb
  volumes:
    - ./rethinkdb-data:/data
  expose:
    - 29015
    - 28015
    - 8080

shipyard:
  image: shipyard/shipyard
  ports:
    - 8080:8080
  links:
    - rethinkdb:rethink
  command: -rethinkdb-addr="rethink:28015"

But it won't work and gave an error message below
Creating shipyard_rethinkdb_1...
Creating shipyard_shipyard_1...
Attaching to shipyard_rethinkdb_1, shipyard_shipyard_1
shipyard_1  | time="2015-07-16T02:19:13Z" level="info" msg="shipyard version 2.0.10"
shipyard_1  | time="2015-07-16T02:19:13Z" level="fatal" msg="factory is not able to fill the pool: gorethink: dial tcp <IP_ADDRESS>:28015: connection refused"
shipyard_shipyard_1 exited with code 1
Gracefully stopping... (press Ctrl+C again to force)
Stopping shipyard_rethinkdb_1...

And then, everything stopped.
Here are logs in rethinkdb
[elc@atsg153 shipyard]$ docker-compose logs rethinkdb
Attaching to shipyard_rethinkdb_1
rethinkdb_1 | Running rethinkdb 2.0.3~0trusty (GCC 4.8.2)...
rethinkdb_1 | Running on Linux 3.10.0-123.20.1.el7.x86_64 x86_64
rethinkdb_1 | Loading data from directory /data/rethinkdb_data
rethinkdb_1 | Listening for intracluster connections on port 29015
rethinkdb_1 | Listening for client driver connections on port 28015
rethinkdb_1 | Listening for administrative HTTP connections on port 8080
rethinkdb_1 | Listening on addresses: <IP_ADDRESS>, <IP_ADDRESS>, ::1, fe80::42:acff:fe11:65%746
rethinkdb_1 | Server ready, "bf6c142c0dcd_sd2" f01a84a7-11d1-4432-9b46-185dcc7a5704
rethinkdb_1 | A newer version of the RethinkDB server is available: 2.0.4. You can read the changelog at <https://github.com/rethinkdb/rethinkdb/releases>.

^C
Aborting.

Maybe the problem was that rethinkDB wasn't ready while shipyard trying to connect to it ?
It seems docker-compose couldn't set wait time between services.

DOCKER_OPTS="-H tcp://<IP_ADDRESS>:4243 -H unix:///var/run/docker.sock"
and restart docker:
sudo service docker restart

Thanks @mboussaa
But docker daemon already listens to a tcp port
``
/usr/bin/docker -d -H <IP_ADDRESS>:2375 -H unix:///var/run/docker.sock --insecure-registry   xxxxxxxxx:5000

try to put your host ip instead

@mboussaa  The problem is that shipyard couldn't connect to rethinkdb.
My docker daemonn works fine.

So, I don't know how to help you.
Good luck.
you may ask @ehazlett ...

I think this is due to rethink not being ready. I thought there was s fix
where it would attempt a reconnect. I will check.
On Saturday, July 18, 2015, mboussaa<EMAIL_ADDRESS>wrote:

So, I don't know how to help you.
Good luck.
you may ask @ehazlett https://github.com/ehazlett ...
—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/570#issuecomment-122531219.

Ok here my solution:

in terminal :
docker create
--name shipyard-rethinkdb-data
shipyard/rethinkdb

in docker-compose.yml:
#Shipyard: Graphical dokcer manager
shipyardrethinkdb:
  image: "shipyard/rethinkdb"
  volumes_from:
    - "shipyardrethinkdbdata"
  ports:
    - "<IP_ADDRESS>:49153:8080"
    - "<IP_ADDRESS>:49154:28015"
    - "<IP_ADDRESS>:29015:29015"
#     - "8080"
#     - "28015"
#     - "29015"

shipyard:
  image: "shipyard/shipyard"
  ports:
    - "8085:8080"
  links:
    - "shipyardrethinkdb:rethinkdb"

This works fine.
If I create shipyard-rethinkdb-data  container within YAML file it won't work. Any idea to how integrate all this stuff on the YAML file? Compose does not support "create" feature...

You shouldn't need to hard code ports.  If you link them they should be
able to talk to each other.  What version of Engine / Compose are you using?
On Mon, Jul 20, 2015 at 10:13 AM, mboussaa<EMAIL_ADDRESS>wrote:

Ok here my solution:
in terminal :
docker create
--name shipyard-rethinkdb-data
shipyard/rethinkdb
in docker-compose.yml:
#Shipyard: Graphical dokcer manager
shipyardrethinkdb:
image: "shipyard/rethinkdb"
volumes_from:
- "shipyardrethinkdbdata"
ports:
- "<IP_ADDRESS>:49153:8080"
- "<IP_ADDRESS>:49154:28015"
- "<IP_ADDRESS>:29015:29015"
- "8080"
- "28015"
- "29015"
shipyard:
image: "shipyard/shipyard"
ports:
- "8085:8080"
links:
- "shipyardrethinkdb:rethinkdb"
This works fine.
If I create shipyard-rethinkdb-data container within YAML file it won't
work. Any idea to how integrate all this stuff on the YAML file? Compose
does not support "create" feature...
—
Reply to this email directly or view it on GitHub
https://github.com/shipyard/shipyard/issues/570#issuecomment-122898580.

docker-compose version: 1.3.1

Shipyard v3 has been released and is a major refactor.  Could you please check to see if this is still an issue?  If so, please re-open.  Thanks!

Thanks @ehazlett
Shipyard V3 is really awesome!


Discard ovh machines

As per thread: https://filecoinproject.slack.com/archives/C045ZMT5H52/p1673001388982399?thread_ts=1672891286.550709&cid=C045ZMT5H52

Then cancel issue related issue -> https://github.com/filecoin-project/bacalhau/issues/906

Checked with OVH support:
[...] your servers have been set to cancel and delete on their expiration date of March 9, 2023


Merge series/0.23 into main

A straightforward merge.

Tests running is just freezing. Something new. Let's try it a third time.

Yay. How it says in my mother country - God loves the trinity.


example of sheet music generation feature

I noticed the new sheet music generation feature . Does this convert midi to music score ? or a whole mp3/ raw vocals/song to music score.
is this like https://github.com/chrisdonahue/sheetsage ? or is it better/different?

Yes it converts midi or the ultrastar song into music score. But only the vocals+lyric.
I dont know if it does betten then sheetsage. I would say UltraSinger do it worse 😄


BUILD_INFO: document the release process (Maven release plugin)

test this please

Can we merge this PR, I'd like to see this improved doc part of the upcoming release (we can continue to improve it later).

Wait one clarification on how to cancel a release:prepare. The current version is incorrect... I'll update it soon...

Should be ok now!


[API] Add layer visitor for the model

Dependency of the PR
Commits to be reviewed in this PR
[API] Add layer visitor for the model
This patch add visitor for the model api
Self evaluation:

Build test: [X]Passed [ ]Failed [ ]Skipped
Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee<EMAIL_ADDRESS>

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #1788. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnstreamer.mooo.com/.


Add cancellation-tokens to async methods

Closes #231

@twhidden how does this look?

Note: This change is breaking the API surface. The new DLL will not be a drop-in replacement, users have to recompile to get the new method definitions.

Not necessarily. The token can have a default value param, the compiler won't break existing API usages. When I get back to my PC, I'll branch and mock.

It will. For most cases, sure, a recompile will handle it - but for cases with existing compiled programs that reference TMDbLib, it'll be breaking, as the old methods no longer exist.
Anyways. It's a non-issue, as I won't maintain overload methods just to support a rare case of usage :).


entc/gen: ensure that edges are able to use golang keywords

Resolution for #918. After the comment from @a8m and a bit of poking around, I felt confident in putting this in.

Thanks for adding this @imle! Please sign the CLA form.


Matrix support ?

I am contemplating doing something where I may need / want (dense) matrix support, and I have been thinking that an approach similar to what R does (i.e. have it be a vector that happens to have a dimension attribute) may be an option by sticking a dimension vector into the void* private_data slot.  This seems both 'hackish' yet somewhat obvious.
Or am I missing existing prior work elsewhere?  Has there really not been any other work where matrices are being passed around via the arrow interface?  Thanks in advance for any pointers, or even just a blank 'you are nuts and here is why ...'.

(1) For this sort of thing, you should use an extension type as that is the standard way to "layer" new semantics and type metadata onto an existing Arrow type. (2), does the "fixed shape tensor" extension type suit your needs?

Tensors had come up in a past life, albeit with the caveat that what was out there was 'early and raw'.
But thanks for sending me on my way here. I will take a good look at extension types.  No issue here, so closing.  Thanks again!

Thanks for the re-open, Dewey.  After spitballing the two references by David it seems we could do something here in nanoarrow around its interfaces.  Thoughts?

At first glance, that seems expensive.  My (initial) thinking was that i) vectors are great, and (nano)array arrays are vectors (in the simple instance of a contiguous array) and ii) most linear algebra consumers take such a vector and merrily form a matrix from it, often zero-copy.  So from mat <- matrix(1:6, ncol =2, byrow = TRUE) I really want the vec <- as.vector(mat) and wondering if there is a good way to 'also' attach the the dim <- c(3,2) part in way that makes sense.  Metadata may be a way that is simpler and more robust that a schema-in-private-data, my initial idea.
But you all know the wider arrow landscape better than I do so please shoot holes into this at earliest convenience...

Thanks for #692, @paleolimbot.  It is an excellent first step and 'proof of the pudding'.  I am now trying to complement it from the other side closer to my initial use case / idea and idea by starting from in C(++), i.e. trying to create a proper struct containing such a fixed_sized_list wrapping a matrix.  Needless to say a naive
ArrowSchemaInitFromType(sch->children[1], NANOARROW_TYPE_FIXED_SIZE_LIST)

hits the wall quite quickly.  Do you have plans to complement #692 either here in src/ and/or in, say, the ADBC packages?

That looks promising.  Was wondering where the size element would enter -- this makes sense.  (Also, the spec of +w:3 does not give the representation aka storage type.)
As for ArrowArrayAppend I cobbled together a 'local' one which copies vectors 'whole' in one memcpu() step (taking arguments for length and element size and along with an optional validity buffer) but I hear you -- the nesting here will require an extra step.

Thanks -- got back to this now and got it working, with a little trial and error.  Even emits components with the JSON printer I borrowed from your test code.  A test function called with an int vector and a double vector intented for a two column matrix comes out fine as in your R example.


Notification comes early than changes are applied (Contact creation)

Hi, thank you for the repo I got a lot of information
I would open just discussion bot not issue about the topic but don't see the option for discussion
I test the example on iPad and iPhone
When I add Contact the notification on other devices comes early then Contact was created in the cloud data base, so fetchLatestChanges does not fetch new dataset with created record
When I delete there's no such effect everything is fine
The only solution currently to add delay(Task.sleep) before
try await PrivateSyncApp.vm.fetchLatestChanges()
then everything is fine
Do you have the same effect ?

Hi @The-Igor — have you changed the behavior of fetchLatestChanges at all? When fetching using queries there is some delay between when the database has been updated and when a query returns those changes, due to time required to re-index, but this wouldn't be expected when using recordZoneChanges(...) as this sample does.

Hi @The-Igor — have you changed the behavior of fetchLatestChanges at all? When fetching using queries there is some delay between when the database has been updated and when a query returns those changes, due to time required to re-index, but this wouldn't be expected when using recordZoneChanges(...) as this sample does.

I did not change The same effect you might observe using NSUbiquitousKeyValueStore and NSUbiquitousKeyValueStore.didChangeExternallyNotification
Notification (in my case I change on iPhone and expect notification on iPad) comes earlier then change was applied, but not all the time like third time:)
The second time I came across this when stated working with cloud containers the same side effect.


WrapPanel with ScrollBar/Navigation buttons?

I am trying to achieve the following result - arrange tab headers in a single row or single column with a scrollbar.
After programmatically filling the TabControl through the Items property, the headers are arranged in several rows/columns.
Is it possible to programmatically configure the WrapPanel view?
I understand that I can do this by setting the markup in XAML, but how do I save programmatic tab generation in this case?

I plunged into the documentation and found a template suitable for my tasks - https://github.com/AvaloniaUI/Avalonia/blob/master/samples/ControlCatalog/SideBar.xaml.
Thanks!