x/build/cmd/release: green-screen on Windows ARM64 builder with SkipTests: false

It's unclear what is causing this issue on the Windows ARM64 builders, only during the release process. The builders are otherwise passing tests on the Go dashboard.
Discovered while testing #42604.
What version of Go are you using (go version)?
Go tip: 4711bf30e5fec4cf290964785871deba5955c29a
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
windows/arm64
What did you do?
@@ -206,10 +206,6 @@ var builds = []*Build{
                Arch:    "arm64",
                Race:    false, // Not supported as of 2021-06-01.
                Builder: "windows-arm64-10",
-               // TODO(golang.org/issue/46406, golang.org/issue/46502): Fix
-               // or skip failing tests, ensure the builder is fast enough to
-               // complete tests, then remove SkipTests here.
-               SkipTests: true,
        },

go run ./cmd/release -rev master -target windows-arm64 -version go1.17beta900

What did you expect to see?
A successful build with passing tests
What did you see instead?
2021/06/30 12:39:40 windows-arm64: Building (all.bash to ensure tests pass).
 /status
2021/06/30 12:45:17 user-rakoczy-windows-arm64-10-1: timeout after 10s waiting for headers for /status
2021/06/30 12:45:37 user-rakoczy-windows-arm64-10-1: timeout after 10s waiting for headers for /status
2021/06/30 12:45:37 Buildlet https://farmer.golang.org:443 failed three heartbeats; final error: timeout waiting for headers
2021/06/30 12:45:37 user-rakoczy-windows-arm64-10-1: peer dead with Buildlet https://farmer.golang.org:443 failed heartbeat after 10.001424152s; marking dead; err=timeout waiting for headers, waiting for headers for /halt
2021/06/30 12:45:37 windows-arm64: Error: Buildlet https://farmer.golang.org:443 failed heartbeat after 10.001424152s; marking dead; err=timeout waiting for headers

Stop code: MEMORY MANAGEMENT
Stop code: IRQL NOT LESS OR EQUAL

I tried to gather more information on this issue by making use of a physical windows/arm64 machine I have access to. I ran all.bat a number of times on it, and can confirm this issue doesn't reproduce on it, as all.bat passes okay (even with GOROOT_FINAL and other environment variables set as cmd/release does) without causing any green-screens. I tested with a recent Go tip commit, b7a85e0003cedb1b48a1fd3ae5b746ec6330102e.


No module named

Versions

Python: 3.7.1
OS: Windows 10
Kivy: 1.10.1
Kivy installation method: pip install kivy

Description
When I make exe file with PyInstaller (3.4) there are some "No module named" errors.
Code and Logs
[CRITICAL] [Camera      ] Unable to find any valuable Camera provider.
picamera - ModuleNotFoundError: No module named 'picamera'
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core_init_.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core\camera\camera_picamera.py", line 18, in
from picamera import PiCamera
gi - ModuleNotFoundError: No module named 'gi'
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core_init_.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core\camera\camera_gi.py", line 10, in
from gi.repository import Gst
opencv - ModuleNotFoundError: No module named 'cv2'
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core_init_.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core\camera\camera_opencv.py", line 45, in
import cv2
CRITICAL:kivy:[Camera      ] Unable to find any valuable Camera provider.
picamera - ModuleNotFoundError: No module named 'picamera'
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core_init_.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core\camera\camera_picamera.py", line 18, in
from picamera import PiCamera
gi - ModuleNotFoundError: No module named 'gi'
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core_init_.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core\camera\camera_gi.py", line 10, in
from gi.repository import Gst
opencv - ModuleNotFoundError: No module named 'cv2'
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core_init_.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "D:\PycharmProjects\AbcAlarm\venv\lib\site-packages\kivy\core\camera\camera_opencv.py", line 45, in
import cv2
[INFO   ] [Clipboard   ] Provider: winctypes
INFO:kivy:[Clipboard   ] Provider: winctypes
[INFO   ] [Factory     ] 194 symbols loaded
INFO:kivy:[Factory     ] 194 symbols loaded
// REPLACE ME: Paste your code and logs here, a template can be found at https://git.io/vM1id.

you can filter providers you want kivy to try by using env variables, e.g
from os import environ

environ['KIVY_WINDOW'] = 'sdl2
# now you can import kivy things
from kivy.app import App

make sure to only set providers you package with your application, and that should get ride of the errors.

No working still


Resolve ambiguity in profile consumption best practices

Describe the problem
There's no official best practice regarding profile data consumption or modification of profile data at runtime.
This has led to different services consuming profile data in different ways. Some variants:

Copy all profile data locally and then discard the profile entirely.
Copy mutable profile data locally, but continue to reference read-only profile data for lifetime of the service.
Use profile data exclusively and make no local copies.

This has also led to profile inspectors behaving in different ways. Some allow you to modify their contents in play mode and observe the effects of those changes on the active service. Others are completely locked down.
Lots of open questions here. Should services copy and forget profile data? If not, should runtime profile usage be limited to read-only data? If not, is it ever appropriate to modify profile data at runtime to observe changes in service behavior? If so, when is it appropriate (eg in editor vs in build)?
Describe the solution you'd like
We need to define some profile data consumption best practices, then update our existing services to follow those best practices.
Additional context
Discussed previously here: #4335
Also related: #4146

Agreed. Core systems and MRTK team provided extension services should behave the same with regards to data read from profiles.
I believe the most consistent behavior (shared by a majority of existing services) is the following:

Read the profile into service properties
Any profile settings that support runtime modification should have setters
Read-only profile settings should have only getters
All runtime changes should be made to the service properties, not the profile

Closing as stale; I don't think we'll be making major changes to the profile systems in the future.


Update Microsoft.Azure.KeyVault to support .NET Standard 2.0

Currently, there are some APIs in Microsoft.Azure.KeyVault only available when targeting .NET Framework, for instance Microsoft.Rest.Azure.Authentication.ClientAssertionCertificate. With the thousands of new APIs available in .NET Standard 2.0 (compared to netstanard1.5), this restriction may not be necessary anymore.
FYI - upstream, we've converted Microsoft.Extensions.Configuration.AzureKeyValue to .NET Standard 2.0. This is the only API missing from the .NET Standard build, which means we also have to cross-compile for .NET Framework.

@natemcmaster we have another issue tracking this move.
We need to plan this and will keep you updated.

Ping. Any updates to your plans?

Ping. Any updates to your plans?

Any news?

The latest SDK is compatible with .NET Standard 2.0 - see https://aka.ms/azure-sdk-preview2-net


Ruleset::registerSniffs(): add tests

Description
Suggested changelog entry
N/A
Related issues/external references
This PR is part of a series of PRs expanding the tests for the Ruleset class.

@fredden Thanks for reviewing!

This looks like a good addition to the test suite. Is it intentional that this code block isn't being tested?

Kind of. My fantasy ran out and I couldn't come up with a (realistic) test case which managed to hit that line (I did try, but if I remember correctly, anything I tried which should hit the line, was already filtered out of the $files list before it reached the registerSniffs() method). It may actually be redundant code, but I didn't think removing it now was prudent. Let's give it a little more time, who knows, someone else may be able to come up with a test case for it ;-)


Hi, I want to run this code on my own dataset for image to image task,what should I do?

Hi, I want to run this code on my own dataset for image to image task,what should I do?

@jychoi118 The same need, do you have a solution?

+1

@jychoi118同样的需求，你有解决方案吗？

请问您们解决了吗？


Add a command to extract the version number

There are times where external tooling needs access to the version number of the package/application during the build step.
As is the case during the build step, the application is not yet installed at that point. Nor do you necessarily want to do that on the build environment (think: building in a remote pipeline).
I currently resorted to storing the version number in a <package>/version.txt file which I then read in the <package>/__init__.py file. This has the advantage that the version is available in a predictable location and is easily readablo by any external tool. It has the downside that it confuses pyinstaller.
flit already manages to extract the version number from the build process. And there is no need to specify it in the ptproject.toml file. Which is really nice.
But that means that there is no way to get to the version number from external tools. Before the pyproject.toml file switch, one could also do python setup.py --version which is also no longer possible.
It would be really nice if flit had a command to do just that.
Tangentially, there are other useful setup.py commands which help during build steps like --name and --fullname which I used to determine filenames of contents in the dist folder. With those it was however not possible to get the filename of a generated whl file. I think flit would be in a good position to offer those as well.

Yes. this would neatly fix things like #253 (without ignoring errors) and #257 (without adding complexity to flit)

Hmm... seems that only my commit got linked. The PR #263 was not linked. Here's to hoping that this comment will do just that 😉


Make meta_tags fail gracefully

Just ran into an issue where a base template used for wagtail pages also acted as base template for the absolutely-not-wagtail-managed 404 page, so the base template had this:
{% load i18n wagtailcore_tags wagtailmetadata_tags ... %}

{% get_current_language as lang_code %}

<!DOCTYPE html>
<html lang="{{ lang_code }}">
  <head>
    ...
    {% block watail_metadata %}
      {% meta_tags %}
    {% endblock %}
    ...
  </head>
  <body>
    ...
  </body>
</html>

and everything worked fine for normal pages. However, 404 pages using the same base template (so that they look like any other page) don't have any page model backing it, so this code will crash Django, because it's trying to run the meta_tags tag for something that doesn't implement the MetadataPageMixin class.
Can the meta_tags tag be changed to simply output "nothing" when it's run for a context/page that's missing whatever fields from MetadataPageMixin it needs to tap into?

@Pomax I opened a PR to fix this issue, maybe you could have a look there as well.

Would it be possible to reopen it? "Rewrite the templates" is not how you prevent, or even find out why production crashes =)

@Pomax I've opened #55 which includes error messages for missing models or requests when trying to use the template tags, happy for any feedback.
As explained in the #54, we can't let the meta tags fail silently but hopefully this will at least let the developers know why their pages aren't working as expected when using meta_tags improperly.

ah, that's great, thank you!

So it's a good practice to just use {% if request and self %}{% meta_tags %}{% endif %} in the base.html? Considering it's actually simpler than overwrite template using blocks.

@favoyang yep, if that works for you that's fine :)

I think it would be worth mentioning it in the docs that if missing the self parameter it will fail on like 404 if you put the tag into the base.html, which is hard to find out because Django has a different 404 page for development. And it will break your production deployment easily, and you probably won't notice it either, since people trends to not check the 404 page in their post-deployment verification script.


Clarifications regarding server request metrics

I'd like to clarify the meaning behind server.task.total and server.task.alive --

Is server.task.total the total number of requests serviced by the server? The docs mention "Each client connection will be promoted to task only if the negotiation success.", but this value is, as far as I can tell, not the number of client connections accepted by the server, since this value is different from listen.accepted even with no authentication in place.
Similarly, is server.task.alive the number of requests currently being serviced by the server? In my current setup, this value is very high -- for reference, server.task.total has a rate increase of around 700-800, and server.task.alive is around 12k. Each request takes around 120ms as recorded by the upstream application
In my testing, server.task.total did correspond to the total number of requests, but this was without connection pooling

The upshot is, I'm looking for a measurement of the number of requests relayed by the proxy over time (or QPS). Do any of these two metrics fulfil that requirement?
Thanks in advance, and apologies if this is already explained in the docs.

Is server.task.total the total number of requests serviced by the server?

Yes, the requests here is proxy requests which may be http_forward, http_connect, socks_connect. The user level request metrics will contain an extra request tag to show the real proxy request type.

The docs mention "Each client connection will be promoted to task only if the negotiation success.", but this value is, as far as I can tell, not the number of client connections accepted by the server, since this value is different from listen.accepted even with no authentication in place.

No. 'server.connection.total' is like listen.accepted if all connections can be authenticated successfully. You may send several proxy requests in one single connection.

Similarly, is server.task.alive the number of requests currently being serviced by the server?

Yes, the task here is also valid proxy requests.

In my current setup, this value is very high -- for reference, server.task.total has a rate increase of around 700-800, and server.task.alive is around 12k. Each request takes around 120ms as recorded by the upstream application

For https requests, in which case the client will send HTTP CONNECT request, the alive task here is actually the count of alive connections, which may not get closed after client received the HTTP response, and thus live longer.

The upshot is, I'm looking for a measurement of the number of requests relayed by the proxy over time (or QPS). Do any of these two metrics fulfil that requirement?

The rate of server.task.total is the RPS of proxy requests.
To see the rate of each specific proxy request type, you need to setup a user group with anonymous user enabled and then use the rate of user.request.total with the corresponding request tag set. This way you can see the RPS for plain HTTP traffic.
Currently we didn't support layer 7 http request metrics in audit code if TLS interception is used, but this may be implemented if needed.

Ah, gotcha. This is really helpful. Amazing project by the way, its been a real gamechanger for me 🙏


build(backend): Update Rust version

A new Rust version available.

@bitdivine may you please review this one? The linter raised an issue, I think related to the bump.
I think I fixed it with https://github.com/dfinity/oisy-wallet/pull/2977/commits/64a26cc24294eca33f0c6f711e21ab9f6304d72e, but I would appreciate your feedback


ssh: add possibility to use match conditions inside a host match block

This change enables to create host match blocks where it's possible to check
against flowing arguments.

canonical
exec
host
originalhost
user
localuser

I've thought about adding support for Match before but a concern I had was the possibility of having multiple match criteria. From the man page I understand that something like
Match user myuser host example.com
  ForwardAgent yes

would be a valid match block, which this setup would not support.
I suspect that to fully support Match we'd need something that allows configurations like
programs.ssh.matchBlocks = [
  {
    match = [ { user = "myuser" } { host = "example.com" } ];
    forwardAgent = true;
  }
]

Sorry for the late reply, looks like I was in some kind of rush to have it available and overlook some important details :sob:
I'll go back to my drawing board and try to solve the problem in the on or other way :smiley:


Single sh script nix package doesn't export the binary

Hello,
I'm new to nix, I installed on Ubuntu Vivid (15.04) and created a basic nix recipe which goes fine but who don't export the desired script at the end.
with import <nixpkgs> {};
#{stdenv, fetchurl}:

stdenv.mkDerivation {
  name = "trash-0.1";

  src = fetchurl {
    url = https://rawgit.com/chilicuil/learn/master/sh/tools/trash;
    sha256 = "0fe78144273d6afac1cef15de4a768ceb7f689a490b3c89110179df61401afae";
  };

  #unpackPhase patchPhase configurePhase buildPhase checkPhase installPhase
  #fixupPhase distPhase
  phases = [ "unpackPhase" "installPhase" "fixupPhase" "distPhase" ];

  unpackCmd = ''
    stripHash $curSrc
    mkdir trash
    cp -prd --no-preserve=timestamps $curSrc trash/$strippedName
  '';

  installPhase = ''
    mkdir -p $out/usr/bin
    chmod +x ../trash/$strippedName
    cp -r ../trash/* $out/usr/bin
  '';

  #dontStrip = true;
  #dontPatchELF = true;
  #dontPatchShebangs = true;

  meta = {
    description = "Rm wrapper around the trash freedesktop specification.";
    homepage = https://github.com/chilicuil/learn/;
    license = "WTFPL";
    maintainers = "Javier López<EMAIL_ADDRESS>  };
}

Testcase
$ bash <(curl https://nixos.org/nix/install)
$ source ~/.nix-profile/etc/profile.d/nix.sh
$ wget http://sprunge.us/bOdO -O trash.nix
$ nix-env -i -f trash.nix
...
patching script interpreter paths in /nix/store/q6fn9pnhz2xyfx7m5v614dz15354635b-trash-0.1
/nix/store/q6fn9pnhz2xyfx7m5v614dz15354635b-trash-0.1/usr/bin/trash: interpreter directive
changed from "/bin/sh" to "/nix/store/cxrc12hkmvrjlq747cm08av6jl41nzi1-bash-4.3-p30/bin/sh "
building path(s) '/nix/store/b45q4pjgljjv7wiv8mgwvq1bssppd9a5-user-environment'
created 7 symlinks in user environment
$ trash
The program 'trash' is currently not installed. You can install it by typing:
sudo apt-get install trash-cli
$ ls -lah /nix/store/q6fn9pnhz2xyfx7m5v614dz15354635b-trash-0.1/usr/bin/trash
-r-xr-xr-x 1 admin admin 12K Jan  1  1970 /nix/store/q6fn9pnhz2xyfx7m5v614dz15354635b-trash-0.1/usr/bin/trash
$ nix-env -q
nix-1.8
trash-0.1

$out/bin, not usr/bin.

That fix it =)!, thanks.


Starting channel number not available for Custom Filter

Add Custom Filter
Observe no way to edit Starting Number

BTW Go dev here and I have some fixes in my repo for PPV filtering

@Fyb3roptik both of our forks has relatively large amount of code rewritten or changed and are pretty different, it's hard to just pick a change from yours without breaking something in mine 🤕
Thought maybe it's better to create a new issue here with description of a feature you would like to see in this one and I would refer to your fork to grab some code pieces (mentioning your work course!).
P.S: Will make a new build with this issue closed soon. ~ In a hour.

Haha yeah I'll get a PR going in your stuff. I did notice a weird issue where I couldn't edit a mapping by clicking on it

@Fyb3roptik do you mean these table rows?

Weirdly on my side its working fine, maybe try with https://github.com/SCP002/xTeVe/releases/tag/<IP_ADDRESS>0 + check the browser console if it's saying something.

It's only when I use custom filter instead of group

Do you want to put this repo in a new org and possibly rebrand xteve2 or something?

TL;DR: No, don't see a reason to, but will gladly listen to people's arguments, so I could if you want.
My roadmap is to, well, close these three: https://github.com/SCP002/xTeVe/issues/35 https://github.com/SCP002/xTeVe/issues/36 https://github.com/SCP002/xTeVe/issues/38 (this one half done ATM, at least it looks like it is 🙃), in a next few days (depending on my free time etc.), upload the final release and archive this repository, because soon I'll switch to another project and it would be unfair to let people waste time on submitting new issues etc. which I'll never touch in the future ( ._.)
Why so:
Forgive me people, but after I close these three, my own usecase will be covered with xTeVe's current functionality and to be honest, I dont really won't to become a new day-to-day maintainer of this project.
P.S: Forgive my English.

Would you mind if after that happens I fork it into its own project? Obviously would have all credits in place

Sure! Moreover, credits are not mandatory: you are completely free to do whatever you want to do :)

No sir! I give credit where it's due! That's what makes this community great!


Documentation link in README is broken (leads to 404)

Change link to https://ndabids.readthedocs.io/en/latest/

Updated with commit d4a1c1e


Library no longer builds

The slice_flatten feature has has had its API renamed and has been stabilized.
error[E0599]: no method named `flatten` found for reference `&[[u8; 4]]` in the current scope
    --> /home/widders/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wiring-0.2.1/src/core/wire.rs:1780:30
     |
1780 |         let r = c.as_slice().flatten();
     |                              ^^^^^^^ `&[[u8; 4]]` is not an iterator
     |
help: call `.into_iter()` first
     |
1780 |         let r = c.as_slice().into_iter().flatten();
     |                              ++++++++++++

For more information about this error, try `rustc --explain E0599`.
error: could not compile `wiring` (lib) due to 1 previous error

Thank you, I will look into it.

#5721b44

Fixed in commit Rename slice_flatten.

ref: https://github.com/djkoloski/rust_serialization_benchmark/pull/85/commits/7b57a5c6efdde66e6bbb9f4e2ff5cbbfd2e9723e


Update for ipywidgets 7.0 and JupyterLab 0.28

Fixes #15.

Removed export button and fixed the handling of interactivity toggling.
Fixed the download image behavior since Chrome no longer supports data urls for window.open.

@tacaswell @SylvainCorlay, I had one bug that I can't figure out.  I sometimes get the following error that is cleared by restarting the kernel:

cc @jasongrout

Note that the video above shows it creating a new window to download.  I changed it so that it automatically downloads '<figure_title>.png` without navigating away from the page.

Note that the following also works (should this close #9)?:
%matplotlib ipympl
import matplotlib.pyplot as plt

plt.plot([0, 1, 2, 2])
plt.show()

Found the source of the usage error:
https://github.com/ipython/ipython/blob/dfb458636b247a78f4a57206128caffd97035ea5/IPython/core/pylabtools.py#L27
Ensured that we always get "ipympl" in 676ea16.

Ah, the problem is that the addition of widget in IPython.core.pylabtools needed a corresponding addition to https://github.com/ipython/ipykernel/blob/71c44fe80e79126de4f27e6713fda1d274132d77/ipykernel/eventloops.py#L45.

PR: https://github.com/ipython/ipykernel/pull/275

Goog catch for the IPython backend name!

Sweet!  Can you add me to the PyPI maintainers?

Done!


Add file and line info to backtraces under Linux

This work provides file and line info by reading the DWARF debug section .debug_line and resolving the stacktrace addresses.
 _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x43f12e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x43f089]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x43f0ea]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x43f089]
??:? _d_run_main [0x43f00a]
??:? main [0x43ad87]
??:? __libc_start_main [0x891eca3f]

vs
std.format.FormatException@/usr/include/dmd/phobos/std/format.d(487): Orphan format specifier: %s
----------------
./main(pure @safe uint std.format.formattedWrite!(std.array.Appender!(immutable(char)[]).Appender, char).formattedWrite(std.array.Appender!(immutable(char)[]).Appender, const(char[]))+0x9a) [0x42c302]
./main(pure @safe immutable(char)[] std.format.format!(char).format(const(char[]))+0x34) [0x42bd94]
./main(void foo.bar.f1!(pure nothrow @nogc @safe int main.main().__lambda1(int)).f1(int)+0x23) [0x42bd33]
./main(void foo.bar.f2!(pure nothrow @nogc @safe int main.main().__lambda1(int)).f2(int)+0x15) [0x42f845]
./main(void foo.bar.f1!(pure nothrow @nogc @safe int main.main().__lambda1(int)).f1(int)+0x35) [0x42bd45]
./main(void foo.bar.f2!(pure nothrow @nogc @safe int main.main().__lambda1(int)).f2(int)+0x15) [0x42f845]
./main(void foo.bar.f1!(pure nothrow @nogc @safe int main.main().__lambda1(int)).f1(int)+0x35) [0x42bd45]
./main(_Dmain+0xe) [0x42bd06]
./main(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x1f) [0x435d47]
./main(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x435ca2]
./main(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x2b) [0x435d03]
./main(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x435ca2]
./main(_d_run_main+0x1d2) [0x435c22]
./main(main+0x20) [0x431a48]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f4f61981a40]

-L--export-dynamic linker option is still needed to provide the function names. Otherwise only file and line number are shown.
TODOs:

[ ] add tests
[x] add nothrow and @nogc
[ ] ???

@complexmath, I added your name in authors field as I copied some code from rt/runtime.d.
@MartinNowak, you were interested in this.
Please review freely and if you see any possible enhancements, I will work on them.
Edit: updated output from stacktrace to (file:line function [addr])

Great stuff.
https://trello.com/c/FbuWfpVE/54-backtraces-with-line-numbers

@nogc

That would be important, stack traces must not use the GC.

add tests

As simple as adding this here and diffing the output like here.

[0x432c37] pure @safe bool std.exception.enforceEx!(std.format.FormatException).enforceEx!(bool).enforceEx(bool, lazy immutable(char)[], immutable(char)[], ulong) @ /home/administrator/Projects/d-devel/phobos/std/exception.d:589

I think the order should be file:line function [addr] instead.
/home/administrator/Projects/d-devel/phobos/std/exception.d:589 pure @safe bool std.exception.enforceEx!(std.format.FormatException).enforceEx!(bool).enforceEx(bool, lazy immutable(char)[], immutable(char)[], ulong) [0x432c37]

It would be great to abbreviate the demangled names somehow (@ibuclaw any idea?), but it's not part of this PR.

Great! This is a step in the right direction.

I think the order should be file:line function [addr] instead.
...
It would be great to abbreviate the demangled names somehow...

@MartinNowak, to abbreviate the demangled names we can use:

eponymous templates if possible (when template and function names match) - there's no ambiguity, so DRY.

And omit:

Return type:  file + line is enough to remove ambiguity.
Function attributes: there's so ambiguity and attributes don't provide any additional info at this point.
Fully qualified function name (full name only for template args): file name is enough, so DRY.
Runtime function params (only tempate params): again, file + line is enough to remove ambiguity.
Anything before _Dmain, if the exception is not actually in druntime.

With my and your proposed changes it should look something like this:
std.format.FormatException@/home/administrator/Projects/d-devel/phobos/std/format.d(487): Orphan format specifier: %s
----------------
/home/administrator/Projects/d-devel/phobos/std/exception.d:589 enforceEx!(std.format.FormatException, bool)(..) [0x432c37]
/home/administrator/Projects/d-devel/phobos/std/format.d:487 formattedWrite!(std.array.Appender!(immutable(char)[]), char)(..) [0x430089]
/home/administrator/Projects/d-devel/phobos/std/format.d:6548 format!(char)(..) [0x42faf3]
foo/bar.d:9 f1!(main.main().__lambda1(int))(..) [0x42fa92]
foo/bar.d:19 f2!(main.main().__lambda1(int))(..) [0x4382bc]
foo/bar.d:13 f1!(main.main().__lambda1(int))(..) [0x42faa4]
foo/bar.d:19 f2!(main.main().__lambda1(int))(..) [0x4382bc]
foo/bar.d:13 f1!(main.main().__lambda1(int))(..) [0x42faa4]
main.d:10 _Dmain [0x42fa65]

Additionally, we can pretty print the backtrace by:

Reversing the order: _Dmain first (at the top) -> throw location last (at the bottom) - so there's no need to scroll.
Grouping the functions by package.
Omitting the unnecessary .d file extention.
Placing the template instantiation arguments after the function name and address.
Aligning the function names and addresses in each package.

For example:
in package main (./):
	at main:10 _Dmain(..) [0x42fa65]

in package foo (./foo):
	at bar:13 f1!(..)(..) [0x42faa4] instanciated with: main().__lambda1(int)
	at bar:19 f2!(..)(..) [0x4382bc] instanciated with: main().__lambda1(int)
	at bar:13 f1!(..)(..) [0x42faa4] instanciated with: main().__lambda1(int)
	at bar:19 f2!(..)(..) [0x4382bc] instanciated with: main().__lambda1(int)
	at bar:9  f1!(..)(..) [0x42fa92] instanciated with: main().__lambda1(int)

in package std (/home/administrator/Projects/d-devel/phobos/std):
	at format:6548:    format!(..)(..)		   [0x42faf3] instanciated with: (char)
	at format:487:     formattedWrite!(..)(..) [0x430089] instanciated with: (std.array.Appender!(immutable(char)[]), char)
	at exception:6548: enforceEx!(..)(..)	   [0x432c37] instanciated with: (std.format.FormatException, bool)

-------------------
std.format.FormatException@/usr/include/dmd/phobos/std/format.d(487): Orphan format specifier: %s

I want to work on this (and this is totally outside the scope of this PR), but I won't be able to probably until mid-September. Should I add myself to the trello card?

updated

[x] changed order to file:line function [addr]
[x] added @nogc and nothrow
[x] fixed indentation
[x] void initialized buffers
[ ] add tests
[ ] fix non-linux and 32-bit builds
[ ] simplify resolveAddresses into resolveAddress

I wanted to abbreviate function names but I don't know of a way to do it easily.
@ZombineDev, I agree with all of your suggestions except for the grouping by package. But let's keep this discussion for the next PR.

Omitting the unnecessary .d file extention.

That one is a false friend. What you want is to hightlight the filename and line number to quickly open that in your editor, e.g. /home/administrator/Projects/d-devel/phobos/std/format.d:6548.

Grouping by package sounds nice but might not work well in callback heavy code.

It would be great to abbreviate the demangled names somehow

Omit the return type and attributes from the demangle would be a start.  Can core.demangle even do that?  Not sure about abbreviating templates, but it sounds like could turn into an art form.

Not sure about abbreviating templates, but it sounds like could turn into an art form.

So be it, but the ideas above already look great, and it's also a useful functionality to have for core.demangle.

@yazd, do you need help with the tests or anything else?

I am good. But I do wonder if I should version out all of the code for the other OS'es.
I will have time to do the tests and all that's remaining tomorrow if not today.

src/rt/backtrace/elf.d(172): Error: undefined identifier 'Elf32_Ehdr', did you mean alias 'Elf_Ehdr'?

Might want to put a version(linux): at the top of the file. I'll try to follow up with FreeBSD and OSX support.

Adding FreeBSD support should be easy as it uses ELF. To support OSX, a Mach-O reader is needed.

To support OSX, a Mach-O reader is needed.

Ah right, forgot about that detail ;-).

I have added a test and I needed to use sed to make the diff not depend on the addresses (is there a problem with depending on sed?). The test works on 64-bit, but not on 32-bit as there seems to be a bug in resolving addresses under 32-bit. I will download a 32-bit distro and test under a VM tomorrow night.

Btw, I added @nogc and nothrow to everything but to the opApply implementation due to two reasons:

core.demangle.demangle is not @nogc, nothrow.
opApply takes a delegate that is not necessarily @nogc and calls it.

The current state is similar to the old one.

opApply takes a delegate that is not necessarily @nogc and calls it.

Just as a side note, you can overload opApply for different delegates or templatize the function and let the compiler infer @nogc and nothrow.

I will download a 32-bit distro and test under a VM tomorrow night.

You can simply do make MODEL=32 -f posix.mak unittest.

All green. Please let me squash the commits once the review is done.

As I have noted in the main post: --export-dynamic is used to get the function name. Currently .debug_line is the only section parsed and it only provides file and line number information. There is another section .debug_info that can provide the function name without --export-dynamic. I guess that will be my next task if it is needed. :P

We already rely on --export-dynamic for our current backtraces so it won't be an issue, but getting away w/o it would be preferred.

I have been thinking. I had a goal of minimizing memory allocation during the trace generation process and I think I went too far. Currently the state machine (that produces the address to line mappings) is run for each address. I think it would be better to store the mappings and query against them even if it would require dynamic memory allocation. What do you think?

I cleaned up the code. And reduced the number of times the state machine runs by doing all address checks in the callback.
Anything left to address?

Importing an rt module into a core module?

Where should this go then? :D

Depends on why you need the import.
In any case rt is supposed to differ between compiler vendors, so it is not a good idea to add dependencies to it from common modules.

The only thing I am using from rt is rt.util.container.array. The other stuff is the new code.

Updates:

use output from snprintf instead of strlen.
use externDFunc.

And always enabled using backtrace_symbols (instead of having it a compile-time option) so as to use externDFunc.

Please do not merge. I have found a bug in resolving the addresses.

Please do not merge. I have found a bug in resolving the addresses.

OK, the rest LGTM.

Fixed bug + all green.

Anything left to address?

Sorry for the delay, been busy with the betas.

No problem. Take your time.
The tester failure looks unrelated to this PR and it has happened to different pull requests.

The code style is somewhat different than druntime, but that's no problem.
Thanks for the great work Yazan.

Oh, of course we should mention that in the changelog, see #1387.

Thanks for the review. I will work on adding FreeBSD support in the next few days.

Thanks for the review. I will work on adding FreeBSD support in the next few days.

Nice, let me know if you need help.

I've just pushed a FreeBSD follow up PR: https://github.com/D-Programming-Language/druntime/pull/1399.


OCPBUGS-21618: Bump deps to address CVE-2023-44487

There's no 1.28.3 release yet. So pinning the k8s deps to the latest release-1.28 head

/lgtm


Flow Control faulty logic

While debugging an issue found when working on the recordset table performance changes to recursively push more rows into the DOM, we noticed that some requests were not being "canceled" correctly.
Sometimes you can get the app into a state where 2 of the same request are sent to the server and both are acted on to completion. This isn't an issue in the normal functioning of the app but when the data is paging into the DOM, you can notice this occurring much more often.

#1764 has fixed an issue related to generating duplicated requests. This issue might have been caused with the same flaw that I fixed. I'm not sure what's the best way to test this since the problem described in this issue is not very deterministic. But in my testing in gudmap-dev, I couldn't see any evidence of this.
Assigning to @jrchudy for more testing and verification.

I don't see any duplicate requests like I was before.
With this being fixed we should go back and look at the logic for paging the recordset content into the DOM when there is "more than X cells" to put data into.


[htmlmixed mode] Fixed escaping in double-quote regex string

The htmlmixed mode's getTagRegexp() function composes a regex out of double-quoted strings, which contain the \s regex character specifier. However, this is first being interpreted as a string escape code, which ends up being equivalent to /<\/s*/ (zero or more instances of the 's' character) instead of the intended /<\/\s*/ (zero or more instances of any whitespace character).
This pull request fixes the escaping to be consistent with that used in the getAttrRegexp() function a few lines above.

Thanks!


-- fixed windows warnings

@tuexen: I have corrected all the casts. The casts were made respecting the l-value type, or the function parameter type.
https://github.com/sctplab/usrsctp/pull/60/files#diff-cf74ae95294ec718c23606ed68c65580R512
That was modified to allow working on 64 bits

Thanks. I'll go through it. However, it might take a week or two... I guess it is time for a 64-bit Windows buidlbot. I'll talk to Felix to set one up.

@shiretu
I can confirm the issues when compiling as a Win64 project:
    144 Warning(s)
    16 Error(s)

@tuexen
A Win64 Buildbot will be up and running tomorrow! :rocket:

@weinrank Great! I wasn't aware that we don't build clean on Win64.

Win64 BB is up

I went though the warnings and fixed them such that the buildbot is green. If you see further issues, please let us know that we can configure the buildbot to see also the issues. This way they don't creep in in the future.


Extra space and an additional word occur at the top of the footer.

When we land on the blog page, the 'TranslationTool' appears above the footer, and there is some spacing from the top that looks unappealing to viewers.

#1168 is working on this


Add docs for Consolidate tab

https://github.com/NuGet/docs.microsoft.com-nuget/issues/498

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/Tools/Package-Manager-UI.md
:white_check_mark:Succeeded

docs/Tools/media/ConsolidateTab.png
:white_check_mark:Succeeded

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.


[WIP] Elasticsearch highlighting

A new method to Elasticsearch 1/2 backends that allows to highlight search results.
Usage example:
search_query = 'Wagtail'
search_results = Page.objects.live().search(search_query)
search_results = search_results.highlight(
    fields={
        'title': {},
        'body': {},
    },
    require_field_match=False
)

How to access highlighted fields:
search_result.title_highlight
search_result.body_highlight

Notes:

Both search_result.title_highlight and search_result.body_highlight may be None.

Highlighted fields may contain invalid html. It seems to me that implementor should decide how to work with these fields. For example, he can remove invalid tags like this:
for search_result in search_results:
    if search_result.title_highlight:
        search_result.title_highlight = str(BeautifulSoup(search_result.title_highlight, 'html.parser'))

    if search_result.body_highlight:
        search_result.body_highlight = str(BeautifulSoup(search_result.body_highlight, 'html.parser'))

PR needs tests. I'll add them, when we are happy with the approach.
Topics for discussion:

In the current implementation (24ad275) it's possible to query on Page's QuerySet and highlight fields for EventPage, for example. Do we need this feature?
Would be great to be able to specify a name of an attribute where to set highlighted text. But the current implementation (24ad275) we can pass fields as pure dict which gives us ability to use any Elasticsearch parameters for highlighting. If we want to set target attribute, we probably need another representation of fields for highlight method.

It would be great to have a Python fallback in BaseSearchResults, so it can work on all backends, and a more accurate & optimised version could be written for each backend later.
This feature would be easy to implement in wagtail.contrib.postgres_search, but it may be slower than making it in Python, surprisingly. I already wrote something similar in django-postgrefts, it makes a beautiful and very accurate highlight, but it’s a bit slower than I expected.

Does not highlighting featured for last ElasticSearch version?

@m1kola what's the latest on this PR? With ES5 backend now available and ES6 recently released, this has fallen rather behind. When can we expect this PR to be complete and landed?

What's about ElasticSearch 6?

Guys? What's about that?

Hey. I'm not working on this, currently. Happy for someone else to pick it up.

@kaedroho now that you are implementing facets, maybe it is time for implementing this feature.

Closing this as it's very outdated


Support re-install\auto-install of default pip global packages

It would be a great feature if when a new Python is installed (or the existing one is being upgraded) that a list of default "global" packages could be installed.  Perhaps use a config file like $HOME/.default-pip-packages or something to that effect.  The Node asdf plugin supports this and it is really convenient for command-line tools you always want installed from PIP (like youtube-dl for instance).

Thanks for mentioning this.
If you have time to send a PR I would be more than happy to merge it.
Thank you!

@brennanfee in this particular might I suggest preferring brew install youtube-dl for such CLI tools so they are not affected by the changing versions of python. If a homebrew package doesn't exist, pipx is also a great alternative for globally available CLI tools.
Otherwise, 👍 on automatically installing packages by default globally. rbenv and pyenv do the same:
https://github.com/rbenv/rbenv-default-gems
https://github.com/jawshooah/pyenv-default-packages

brew install youtube-dl

I don't use Mac.

Haha yup- see my edit above.
pipx install youtube-dl
is a good alternative. It’s the successor to pipsi if you’ve used that before.

@AlJohri Thanks for the suggestion on pipx... I was a pipsi fan but have since started switching to pipx.  Problem is that, at present, pipx doesn't play nice with asdf which I need to dig into and figure out.
As for what should happen with this suggestion... I think perhaps the only thing is the documentation should be updated to direct people to things like brew or pipx which are better for "tool installations" anyway.  I thought of it only because ruby gems has a thing like that and I thought python parity would be a good idea.

pipx doesn't play nice with asdf

I never had any trouble with asdf and pipx. Could you please open an issue describing the problem you are getting?
Thanks.

It is a very specific issue with asdf inside a Windows Subsystem For Linux shell and I belief it is an asdf symlink issue not an issue with pipx.  I'm close to tracking it down and will likely submit a PR to asdf or to the WSL team (depending on where the problem lies).
Just FYI... it seems to have an issue if the symlink crosses the linux\windows divide.

FYI an attempt to support this seems to have landed in https://github.com/danhper/asdf-python/pull/39. It is however not documented and doesn't seem to work correctly.
I have opened a PR (https://github.com/danhper/asdf-python/pull/59) that resolves these issues.

Excellent.  I think it is good to offer as a feature regardless.  Some will use it, some won't.  I'll leave it up to you and the other moderators as wo what happens to this ticket.

Thanks to @essh I think this can now be closed.


Allowing non contributors to run gatsby new successfully

Using the git@ url results in the following error for non-contributors:
> gatsby new landing-page git@github.com:greglobinski/gatsby-starter-simple-landing.git
info Creating new site from git: git@github.com:greglobinski/gatsby-starter-simple-landing.git
Cloning into 'landing-page'...
The authenticity of host 'github.com (<IP_ADDRESS>)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,<IP_ADDRESS>' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error Command failed: git clone git@github.com:greglobinski/gatsby-starter-simple-landing.git landing-page --single-branch
  Error: Command failed: git clone git@github.com:greglobinski/gatsby-starter-simple-landing.git landing-page --single-branch

Using the https url, succeeds:
> gatsby new landing-page https://github.com/greglobinski/gatsby-starter-simple-landing.git
info Creating new site from git: https://github.com/greglobinski/gatsby-starter-simple-landing.git
Cloning into 'landing-page'...
remote: Counting objects: 246, done.
remote: Compressing objects: 100% (167/167), done.
remote: Total 246 (delta 98), reused 207 (delta 59), pack-reused 0
Receiving objects: 100% (246/246), 3.20 MiB | 322.00 KiB/s, done.
Resolving deltas: 100% (98/98), done.
success Created starter directory layout

Thank you @jesstelford


Fix document error: wsdl_options.json, not .wsdl

Coverage remained the same at 93.137% when pulling 2155222fedf8777e57442da31842b577543afd39 on aleung:patch-1 into d6dd9c350b391bde7ecc9c0ba14660ccbf394ce6 on vpulim:master.

Travis CI configuration issue?

Couldn't find a repository matching this job.

coveralls issue.  I've restarted the job that failed.  should pass.

@jsdevel test ok

thanks a lot 👍


upgrade python from 3.6 to 3.7 then switch back broke httpie

Here's what happened:

brew upgrade (then I realized python upgrade from 3.6.5 to 3.7.0 and I don't want that)
brew switch python 3.6.5 (so I made a downgrade)
http
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /usr/local/Cellar/httpie/0.9.9_4/libexec/bin/python3.7
Reason: image not found
[1]    14050 abort      http

After all these I think I broke httpie, how can I fix it?

My workaround was to uninstall httpie and re install it.
brew uninstall httpie
brew install httpie

I tried reinstalling httpie and sadly it didn't work, still the same error 😑

I'm getting the same error.  I'm on macos 10.14.  At work I have to use python 3.6, so I had to downgrade from 3.7.  It seems like httpie relies on 3.7 explicitly, so I can't use it anymore unless I brew switch, which is too annoying to do.
dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/Cellar/httpie/0.9.9_4/libexec/bin/python3.7
  Reason: image not found

I'm sure I could come up with some hacky workaround, but it should work out of the box

I tried reinstalling httpie and sadly it didn't work, still the same error 😑

+1

Installing the latest python fixed it for me:
brew install python3
brew switch python 3.7.2_2 # use number of actual version just installed


why use style objects everywhere instead of actual css?

i thought it was because maps were loaded in an iframe, but that's not true. style objects make everything more difficult to understand

Please give a link to source.

for using CSS? http://codepen.io/diana_aceves/pen/HjKdx here's an example. don't have a source though

Link to style objects everywhere. About what style are you talking about?

oh. stuff like this: https://github.com/istarkov/google-map-react#positioning-a-marker https://github.com/istarkov/google-map-react-examples/blob/master/web/flux/components/examples/x_simple_hover/my_great_place_with_hover_styles.js
all your examples use them

I can't get the problem, in real life I know a lot of issues with css classes.
Why do I need prefer classes over styles in simple examples as there is no need for me in css selectors and other stuff?
For example read or view this talk https://speakerdeck.com/vjeux/react-css-in-js
For open source project like this I prefer to use style elements property, because of css naming scopes and other css stuff.
Also for my internal projects I prefer to use sass with css-modules. But I'm sure a lot people doesn't know sass at all, and never used css-modules, so it's not a good idea for simple examples to add sass with css-modules. (And i dislike the idea to write something on pure css)
Also before I wrote this https://github.com/istarkov/babel-plugin-webpack-loaders
There were a lot of issues with server rendering code and tests.
I don't want to speak below about why classes are better than styles etc, IMHO it's not the problem this project solves ;-)

Oh it's because you prefer it. I thought it was because it was a technical limitation. I would love examples with regular CSS and an example with CSS modules :) I personally use css modules and can't stand inlined CSS objects.

CSS modules has changed my life ;-)


[Bug]: (API) SOAP Request Fails Due to Improper Encoding of XML Content Type

Describe the bug
When attempting to send a SOAP request with an XML body, the request fails due to an improper encoding of the content type text/xml. The system throws a java.lang.IllegalArgumentException indicating that it doesn't know how to encode the SOAP envelope as a byte stream
Environment

SHAFT_Engine version : Latest version (8.3.20240803)

To Reproduce
Steps to reproduce the behavior:

Initialize a RequestBuilder object to make a SOAP request.
Set the Content-Type header to text/xml.
Attempt to send the request with the provided XML body.
Observe the failure in the logs.

Example code:
api = new SHAFT.API("http://www.dneonline.com/calculator.asmx");
String requestXml="<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tem="http://tempuri.org/\">\n" +
"   soapenv:Header/\n" +
"   soapenv:Body\n" +
"      tem:Multiply\n" +
"         tem:intA10</tem:intA>\n" +
"         tem:intB2</tem:intB>\n" +
"      </tem:Multiply>\n" +
"   </soapenv:Body>\n" +
"</soapenv:Envelope>";
api.addHeader("Content-Type", "text/xml");
api.addHeader("SOAPAction", "http://tempuri.org/Multiply");
Response response = api.post("")
.setRequestBody(requestXml)
.performRequest();
Expected behavior
The SOAP request should be properly encoded and sent to the server, with the XML body being handled as text/xml content.
Actual  behavior
The system throws a java.lang.IllegalArgumentException, indicating that it does not know how to encode the SOAP envelope as a byte stream, causing the request to fail.
Link to SHAFT_Engine Console logs
https://gist.github.com/KyrillosNageh/086244efc9d26761bfc34e03c58a78e7

can you kindly share a native rest assured code snippet that works?

    String requestXml="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tem=\"http://tempuri.org/\">\n" +
            "   <soapenv:Header/>\n" +
            "   <soapenv:Body>\n" +
            "      <tem:Multiply>\n" +
            "         <tem:intA>10</tem:intA>\n" +
            "         <tem:intB>2</tem:intB>\n" +
            "      </tem:Multiply>\n" +
            "   </soapenv:Body>\n" +
            "</soapenv:Envelope>";

    Response response = given()
            .header("Content-Type", "text/xml")
            //.contentType(ContentType.XML)
            .header("SOAPAction", "http://tempuri.org/" + "Multiply")
            .body(requestXml)
            .when()
            .post("http://www.dneonline.com/calculator.asmx")
            .then()
            .statusCode(200)  // Validate status code directly
            .extract().response();

    String Result =RestActions.getResponseXMLValue(response, "AddResponse/AddResult");

    SHAFT.Report.log(">>>>>>>>>>>> Test result >>>> " + Result);

@MohabMohie
The issue occurs when we set Content-Type using  api.addHeader("Content-Type", "application/json");
Where in this example when we use this api.addHeader("Content-Type", "application/json");  give the error that exist on screenshot
but with this, it works fine .setContentType(ContentType.JSON)
the main reason for it until now I think:

use to api.addHeader("Content-Type", "application/json");  to set  Content-Type
Request body contains \n

`   public void testCreateUser() {
String requestBody= "    {\n" +
"        "name": "Test user1",\n" +
"        "job": "leader"\n" +
"    }";
    api = new SHAFT.API("https://reqres.in/api/");
   api.addHeader("Content-Type", "application/json");
    Response response = api.post("users")
            //.setContentType(ContentType.JSON)
                    .setRequestBody(requestBody)
                            .performRequest();
    System.out.println("Response Body: " + response.getBody().asString());
}`


Upgrading dashboard version

Duplicate of https://github.com/wso2/product-is/commit/57ba125d103e33ee911017078ac3d833ef8b7c66#diff-d62f401977204efd918201eb53824a70


vbom.ml has gone

What happened:
$ go get<EMAIL_ADDRESS>go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>unrecognized import path "vbom.ml/util": https fetch: Get "https://vbom.ml/util?go-get=1": dial tcp: lookup vbom.ml: No address associated with hostname
What you expected to happen:
The import should have been replaced with the non-vanity name as per
https://github.com/fvbommel/util/commit/c69461e88a3651040fa9fe17c444462f587a751a
https://github.com/fvbommel/util
How to reproduce it (as minimally and precisely as possible):
As above.

/assign

@NeilW thanks for the heads up on this!
I've opened a PR to fix this.
https://github.com/kubernetes/kubernetes/pull/94451


Add VS Code settings for eslint

These settings will make sure the file conforms to eslint when saving in VS Code, so you can avoid its wrath when deploying.

Forgot to note, but for these settings to work, you need the ESLint extension for VS Code.


SlackWebhookHandler: Explicitly set content-type header, and post JSON as body

Not setting the content-type header was causing issues with Rocket.Chat (slack compatible). I added the content-type, and removed the "payload" as per specification (https://api.slack.com/incoming-webhooks).
This is a more complete implementation of the slack webhooks, and also fixes the integration problems with Rocket.Chat.
From https://api.slack.com/incoming-webhooks:
"By declaring the content type, no further encoding of the POST body is needed — just provide valid JSON in UTF-8."
curl example
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"This is a line of text.\nAnd this is another one."}' \
 https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

@harmbandstra Super minor thing, but perhaps with this many parameters, refactoring to just a curl_setopt_array() would be in order? There can be marginal speed gains.

@moderndeveloperllc Sure, no problem, I refactored to use curl_setopts_array().

Merged into 1.x and master as https://github.com/Seldaek/monolog/commit/52d9096b14a500dc7629e620deddfa6a14b091b6  and 4260b467605950f2de533b43dab15b92324acd2b - thanks!


PHP8 support

Hi,
I can see there's some work on making the library support PHP8, but I'm still getting errors when adding this library to my project.
Root composer.json requires laravel-validation-rules/credit-card 1.5.0 -> satisfiable by laravel-validation-rules/credit-card[1.5.0].
- laravel-validation-rules/credit-card 1.5.0 requires php 7.* -> your php version (8.0.1) does not satisfy that requirement.
Is there an expected timeline on when this will be updated?

I just released a new version. Please use 1.6.0 - https://github.com/laravel-validation-rules/credit-card/releases/tag/1.6.0


Vue Language Server crashes with "Request textDocument/semanticTokens/range failed with message: Maximum call stack size exceeded"

Environment:
Windows 10 22H2 / WSL2 / Ubuntu
VS Code 1.72.2
Node 16.14.2
Vue Language Features (Volar) 1.0.9 (also happened with earlier version)
Vue 2.7.10
Symptoms:

Code highlighting goes awry.

Heavy memory (Vmmem) usage and sometimes run out and see other errors.

Output:
[Error - 12:54:26 PM] Request textDocument/semanticTokens/range failed.
  Message: Request textDocument/semanticTokens/range failed with message: Maximum call stack size exceeded
  Code: -32603

^^ I'm going to review my "setup for Vue 2" described on the extension's page. If I find anything, I'll update this issue.
Either way, this issue may help someone else in the future.

Experiencing a similar issue here. Same OS, also on WSL2 with Ubuntu. Using node 16.18, Nuxt 3 (rc 12), Volar 1.0.9, also happened before. Sometimes intellisense goes haywire and I need to restart the Vue server for it to get fixed, but then it happens again after another half hour or so. Will check if I can get any useful logs.

I haven't encountered this problem so can't investigate it. For VSCode, a workaround for now is settings "editor.semanticHighlighting.enabled": false in VSCode settings to disable semanticTokens.


fix(acir): Attach locations to MemoryOps in ACIR

Description
Problem*
Initial work towards resolving #2133. Pushing for visibility in case we want to merge this now as this does fix reporting for index out of bounds errors from ACVM, but does not fully resolve #2133. Read the summary for more details.
Summary*
I have added reporting for IndexOutOfBounds errors triggered by ACVM. These occur when there is an index out of bounds on a dynamic arrray that uses the MemoryOp ACIR opcode. The reporting essentially extends the work for unsatisfied constrain statements, but I felt a true refactor of how nargo execute handles ACVM errors can be left for another PR.
In order to report the error accurately, a couple other changes had to be made as well. When we were creating MemoryOp's to work with dynamic arrays in ACIR we were pushing to the list of opcodes directly and not attaching location information. I have switched to calling the push_opcode method when adding opcodes that deal with memory. I have also restricted the opcodes field to now be private with the goal to avoid this error in the future. Any opcodes should be included using the push_opcode method that also attaches a location.
A new dynamic_array_index test has been included under compile_failure which will now exit with this:

The new location data has also exposed the actual bug that occurs in #2133. It looks like we are not handling locations correctly during flattening. A smaller reproduced snippet of the storage proof example is provided in the dynamic_array_index. If the dynamic array is accessed with an index out of bounds later after flattening, only the then case of the array merger is shown. For example
    if z == 20 {
        x[0] = x[4];
    } else {
        x[idx] = 10;
        for i in 0..5 {
            x[idx] = x[i];
        }
    }
    // TODO(#2133): This line should be where we show the error
    // but instead it will show x[0] == x[4] as the line where there is an index out of bounds
    assert(x[idx] != 0)

This bug is also seen in the storage proof example, which will return the below output when calling nargo execute:

However, based on the smaller snippet above, it looks to be using the incorrect location, as the array access being reported is within the then case of an if statement:
        if ((i + n) as u32) < (N as u32)
        {
            out[i] = input[i+n];
        }

Documentation

[ ] This PR requires documentation updates when merged.

[ ] I will submit a noir-lang/docs PR.

[ ] I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

[X] I have tested the changes locally.
[X] I have formatted the changes with Prettier and/or cargo fmt on default settings.

However, based on the smaller snippet above, it looks to be using the incorrect location, as the array access being reported is within the then case of an if statement:

I have found the cause of this bug, and it is not due to misplaced location data during SSA, but rather a missing predicate from MemoryOps. I have a fix locally that I will push based off of this branch after I am done testing the changes.

The follow-up PR (https://github.com/noir-lang/noir/pull/2400) requires a breaking ACVM release so I have re-requested review on this PR as we can merge it in separately.


lsp-user-input-sample NOT working

I'm trying the lsp-user-input-sample sample and it is breaking. When I choose to debug server, below exception was thrown. I tried multiple machines and always reproduced.

I am not able to reproduce this. Could it be that the port is already taken by another program. If so you can change the debugging port here https://github.com/microsoft/vscode-extension-samples/blob/main/lsp-user-input-sample/client/src/extension.ts#L15 and here https://github.com/microsoft/vscode-extension-samples/blob/main/lsp-user-input-sample/.vscode/launch.json#L22


DevOps idea: let people check a repo

From DevOps, it might be interesting to be able to build a test whether this person (the one that is running a PR) is using Ninja or not.  As such: all IDs in his repo should be reserved.  If not: error.
So .. would it be possible to call the backend, and check if an ID (of the added(/changed) is reserved or not?  Or any other way?
Think about it .. ;-)

This API is already there, in fact! It's called getConsumption and you can test it yourself already. There is an example in backend/getConsumption_v1/test.http.
Hope this helps. If not, let me know and I'll reopen the issue.


calendars with spaces in them cause an error

The CLI arg to specify a calendar appears to be misparsed and treated as a start time if the calendar name contains a space.  I've tried every variation I can think of to escape the space (after the necessary quoting for the shell) but nothing seems to work.
$ (gcalcli --config-folder ~/etc/gcalcli list | grep gcal ; for CAL in gcalcli-test "gcalcli test" ; do echo "$CAL"
; gcalcli --config-folder ~/etc/gcalcli agenda --calendar="$CAL" ; done)
  owner  gcalcli test
  owner  gcalcli-test
gcalcli-test

No Events Found...
gcalcli test
usage: gcalcli agenda [-h]
                      [--details {calendar,location,length,reminders,description,url,attendees,email,attachments,end,all}]
                      [--color-owner COLOR_OWNER] [--color-writer COLOR_WRITER] [--color-reader COLOR_READER]
                      [--color-freebusy COLOR_FREEBUSY] [--color-date COLOR_DATE] [--color-now-marker COLOR_NOW_MARKER]
                      [--color-border COLOR_BORDER] [--color-title COLOR_TITLE] [--tsv] [--nostarted] [--nodeclined]
                      [--width CAL_WIDTH] [--military] [--no-military] [--override-color]
                      [start] [end]
gcalcli agenda: error: argument start: invalid get_time_from_str value: '--calendar=gcalcli test'

I believe you have the "--calendar" option in the wrong position.  You can see this from the error where it says "...invalid get_time_from_str value: '--calendar=gcalcli test'".  Notice that the error references the complete string '--calendar=gcalcli test' because you're effectively passing that whole string as the start timestamp.  I made this same mistake a couple of times while typing out commands.  It should be before the sub-command "agenda" like this "gcalcli --calendar="$CAL" agenda...".  So what you should have is:
(gcalcli --config-folder ~/etc/gcalcli list | grep gcal ; for CAL in gcalcli-test "gcalcli test" ; do echo "$CAL" ; gcalcli --config-folder ~/etc/gcalcli --calendar="$CAL" agenda ; done)
Hope this clears things up 👍

I merged #698 as a quick fix to make the error more self-diagnosing, and filed #697 to consider making the order-dependent parsing for --calendar more robust.


E-Ink display does not turn off when shutdown Pi

Hi everyone!
I start 'slowmovie' script correctly, I think. The script runnings fine.
But when I try to shutdown the PI via command line (sudo shutdown now) or unplugging the power plug, the display doesn't turn off:
the last frame played still remain on the screen.
I've also tried to interrupt the python's script (with ctrl+c) and only after I've shutdown again but.. no way.
ps. To clean the display I have to interrupt the python's script and run the 'hello world.py' that I know it runs only for a few seconds before it returning in blank mode (with no image displayed).
But you know, it is only an uncomfortable beginner's workaround.
Any suggest?
Best Regards

The image on the screen will stay until it's cleared, regardless of power.

Thx Nick,
Any damage to the images if they always on In the screen? How can I clean it automatically every shutdown command input?
Best regards at all

No, this is exactly how e-ink works. The image remains until it is changed

Thanks


Ignore Introspection queries in QueryComplexity rule

Followup from https://github.com/webonyx/graphql-php/discussions/1203
The QueryComplexity rule should ignore introspection query. This way you can set the max query complexity very low and still allow introspections to happen.
Introspection has a complexity of around 181.

In regards to https://github.com/webonyx/graphql-php/issues/1207 i guess i would also like to calculate the introspection queries as they can produce a significant load.
Maybe we can implement this feature here in that why, that you have the option enable/disable the exclude.
Thanks!


Headers instead of sessions on scaffolding for API apps

I have a question regarding to scaffolding on API only apps.
Each time I scaffold an spec (controllers for example) it writes
session: valid_session
instead of
headers: valid_headers
  describe "GET #show" do
    it "returns a success response" do
      user = User.create! valid_attributes
      get :show, params: {id: user.to_param}, session: valid_session
      expect(response).to be_successful
    end
  end

Wouldn't it be better to scaffold with headers instead of sessions?
The most APIs are using JWT or other tokens to authenticate.
Aren't Sessions mostly obsolete in APIs?
  describe "GET #show" do
    it "returns a success response" do
      user = User.create! valid_attributes
      get :show, params: {id: user.to_param}, headers: valid_headers
      expect(response).to be_successful
    end
  end

The scaffolding was based on the old controller specs, it simply wasn't something considered. Only hesitation is that switching would have to consider the difference in how headers are handled across rails versions, this would need to be tested as working on all versions of Rails and not just as "output" is correct.

@exocode Do you want to work on a PR to validate the behavior on Rails versions supported by rspec-rails?

@benoittgt I would give it a try :-)

I was wondering about this when I worked on my PR. I am not sure if I understand the initial problem of this issue correctly, but in my opinion this is less of an issue now because since https://github.com/rspec/rspec-rails/pull/2288 scaffolding with the --api option does actually generate request specs that generate a valid_headers method.

Closing since I think this is solved now.


Output Node Name for Frozen Graph

TensorFlow version 1.12
Python version 3.5
Operating system - Windows 10

I'm trying to create a frozen graph of a model but the script requires the name of the output node. So I guess this is a request for help and a feature request. Do you know what the output node's name is? I couldn't find it in the code. And as a feature it would be nice to be able to export our model as a frozen inference graph.

Which script do you use? Please share the code.
Output op is the selected CTC decoder, so in this case 'CTCGreedyDecoder':
>>> print([x.name for x in tf.get_default_graph().get_operations() if x.name.find('CTC')!=-1])
['CTCLoss', 'CTCLoss_1', 'CTCGreedyDecoder', 'gradients/CTCLoss_grad/PreventGradient', 'gradients/CTCLoss_grad/ExpandDims/dim', 'gradients/CTCLoss_grad/ExpandDims', 'gradients/CTCLoss_grad/mul']

The output tensors are then simply the op name + ':x' where x is an integer, e.g. 'CTCGreedyDecoder:0'.
And no, I won't provide a frozen graph nor any feature do achieve this. This is only needed for production which is not the intention of this repository.

@githubharald  I am using below article as reference and script to convert SimpleHTR model to .pb file. Please take a look and let me know how to generate .pb file.
https://towardsdatascience.com/deploy-tensorflow-models-9813b5a705d5
import tensorflow as tf
import os
SAVE_PATH = './save'
MODEL_NAME = 'snapshot-5'
VERSION = 1
SERVE_PATH = './serve/{}/{}'.format(MODEL_NAME, VERSION)
checkpoint = tf.train.latest_checkpoint(SAVE_PATH)
tf.reset_default_graph()
with tf.Session() as sess:
# import the saved graph
saver = tf.train.import_meta_graph(checkpoint + '.meta')
# get the graph for this session
graph = tf.get_default_graph()
sess.run(tf.global_variables_initializer())
# get the tensors that we need
inputs = graph.get_tensor_by_name('inputs:0')
predictions = graph.get_tensor_by_name('CTCGreedyDecoder:0')
# create tensors info
model_input = tf.saved_model.utils.build_tensor_info(inputs)
model_output = tf.saved_model.utils.build_tensor_info(predictions)
# build signature definition
signature_definition = tf.saved_model.signature_def_utils.build_signature_def(
inputs={'inputs': model_input},
outputs={'outputs': model_output},
method_name= tf.saved_model.signature_constants.PREDICT_METHOD_NAME)
builder = tf.saved_model.builder.SavedModelBuilder(SERVE_PATH)

builder.add_meta_graph_and_variables(
    sess, [tf.saved_model.tag_constants.SERVING],
    signature_def_map={
        tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY:
            signature_definition
    })
# Save the model so we can serve it with a model server
builder.save()

@githubharald I am using below article as reference and script to export model. Please take a look and let me know how to export model in .pb file.
https://towardsdatascience.com/deploy-tensorflow-models-9813b5a705d5
`import tensorflow as tf
import os
SAVE_PATH = './save'
MODEL_NAME = 'snapshot-5'
VERSION = 1
SERVE_PATH = './serve/{}/{}'.format(MODEL_NAME, VERSION)
checkpoint = tf.train.latest_checkpoint(SAVE_PATH)
tf.reset_default_graph()
with tf.Session() as sess:
# import the saved graph
saver = tf.train.import_meta_graph(checkpoint + '.meta')
# get the graph for this session
graph = tf.get_default_graph()
sess.run(tf.global_variables_initializer())
# get the tensors that we need
inputs = graph.get_tensor_by_name('inputs:0')
predictions = graph.get_tensor_by_name('CTCGreedyDecoder:0')
# create tensors info
model_input = tf.saved_model.utils.build_tensor_info(inputs)
model_output = tf.saved_model.utils.build_tensor_info(predictions)
# build signature definition
signature_definition = tf.saved_model.signature_def_utils.build_signature_def(
inputs={'inputs': model_input},
outputs={'outputs': model_output},
method_name= tf.saved_model.signature_constants.PREDICT_METHOD_NAME)
builder = tf.saved_model.builder.SavedModelBuilder(SERVE_PATH)

builder.add_meta_graph_and_variables(
    sess, [tf.saved_model.tag_constants.SERVING],
    signature_def_map={
        tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY:
            signature_definition
    })
# Save the model so we can serve it with a model server :)
builder.save()

`


Fixes Python version dependency problems in Travis CI.

When this branch was started, conda had a dependency on Python 3.7 which conflicted with all other test branches requiring another version. The new solution only uses conda as a convenient way to install the desired version of Python on both Linux and Mac OS X, deferring to pip to manage package dependencies in a virtual environment.

Coverage increased (+0.5%) to 99.903% when pulling 9fdcc916d64d0bd78b27fc167d9012bd8b3116e4 on bug_travis_error into 6598fe5abd4a1e1c7a8735f526a2a726b5b3813d on master.

Coverage increased (+0.5%) to 99.903% when pulling 9fdcc916d64d0bd78b27fc167d9012bd8b3116e4 on bug_travis_error into 6598fe5abd4a1e1c7a8735f526a2a726b5b3813d on master.

Coverage increased (+0.5%) to 99.903% when pulling 9fdcc916d64d0bd78b27fc167d9012bd8b3116e4 on bug_travis_error into 6598fe5abd4a1e1c7a8735f526a2a726b5b3813d on master.

Coverage increased (+0.5%) to 99.903% when pulling 9fdcc916d64d0bd78b27fc167d9012bd8b3116e4 on bug_travis_error into 6598fe5abd4a1e1c7a8735f526a2a726b5b3813d on master.

Coverage increased (+0.5%) to 99.903% when pulling 9fdcc916d64d0bd78b27fc167d9012bd8b3116e4 on bug_travis_error into 6598fe5abd4a1e1c7a8735f526a2a726b5b3813d on master.


FIG data points: Allow html tags in certain fields

Some data points want bullet points or multiple paragraphs of explanation. The existing data points template only allows single paragraphs. Update to allow custom html in certain parts of the template that will sometimes have more complex text.
Changes

Mark a few fields as safe in the jinja template.

How to test this PR

Use a data points JSON file that has HTML styling in a intro_text or instruction_text field. (There's an example in the test branch of our private repo)
Import it into your test FIG as usual
See that it displays as rendered HTML

Notes and todos

If this is too much of a risk (e.g. for XSS attacks), help me think of a better solution.

Checklist

[x] PR has an informative and human-readable title

PR titles are used to generate the change log in releases; good ones make that easier to scan.
Consider prefixing, e.g., "Mega Menu: fix layout bug", or "Docs: Update Docker installation instructions".

[x] Changes are limited to a single goal (no scope creep)
[x] Code follows the standards laid out in the CFPB development guidelines
[x] Future todos are captured in comments and/or tickets
[ ] Project documentation has been updated, potentially one or more of:

This repo’s docs (edit the files in the /docs folder) – for basic, close-to-the-code docs on working with this repo
CFGOV/platform wiki on GHE – for internal CFPB developer guidance
CFPB/hubcap wiki on GHE – for internal CFPB design and content guidance

If this is too much of a risk (e.g. for XSS attacks), help me think of a better solution.

The intro_text field could be changed to a Wagtail RichTextField, which supports both bulleted lists and multiple paragraphs (the specific features can be limited). The instruction_text is trickier since it's coming from an arbitrary JSONField.

I will look into that option @chosak, thank you! But I think I'll need to add it as a backlog item, so our team can get started with an MVP.


OCS-Operator now supports multiple external monitoring IPs

A ceph cluster will contain an active 'mgr' (manager) and
(may have) multiple stand-by 'mgr'-s.
This change will allow OCS-Operator to accept multiple
(comma / space separated) endpoints/IP addresses, which
will be passed to external ceph-cluster spec.
This will help rook (which reads the ceph-cluster spec internally)
to change over to the next 'mgr' when the current active 'mgr' fails.
Signed-off-by: Arun Kumar Mohan<EMAIL_ADDRESS>

@jarrpa , can you please take a look at this PR... This PR is to add an array of MGR pods (one active and other standby mgrs) and pass it to the ceph cluster.
Why is it needed?: We are unable to get metrics if the active mgr goes down, as we only pass active mgr pod IP.

In general I like what I see. A few questions at the top:
* Is there a limitation that forces the incoming list to be comma separated instead of space separated? I see that there is a possibility to use `string.FieldFunc()`, but at that point you're writing a small inline function... so may as well use `ReplaceAll()`.

In the current implementation, we accept both space and comma as delimiters. As mentioned in the comment, we replace all the commas with space, then use strings.Fields() function to split this modified (no-comma-only-space) IP-string into an array of strings.

* Since you're using the same conversion twice, what about creating a new function like `func parseMgrMonitoringIPs(data string) []string {}` or something? Part of `external_resources.go`.

The initial thought was, as it is only a single line, strings.Fields(strings.ReplaceAll(monitoringIP, ",", " ")), why make a separate function. But reading through your comment, it may be a good approach to provide a function to parse the monitoring IPs. Please take a look.

/ok-to-test

/test ocs-operator-bundle-e2e-aws


rename CssVariable* to CssCustomProperty*

:octocat: https://github.com/BryanWilhite/Songhay.Modules/blob/main/Songhay.Modules/Models/CssPrimitives.fs

I assert that the CssCustomProperties type can be removed because it is not being used in the F# stack here on GitHub and mapping a list of string * string tuples to CssCustomPropertyAndValue.fromInput should be more useful


Manage OTP servers at the application level

 Issue by landonreed
Thursday Nov 15, 2018 at 19:12 GMT
Originally opened as https://github.com/catalogueglobal/datatools-ui/pull/256

This is the UI PR to accompany catalogueglobal/datatools-server#124. It moves the management of OTP servers from the project settings to the site admin settings and allows servers to be optionally available to all projects in an application (or project specific). This also resolves #234, another deployment-related ticket.
This also fixes the merge project feeds job to conform with the standard approach of attaching just the ID of the related entity (project in this case) to the job JSON object, rather than the whole project object.

landonreed included the following code: https://github.com/catalogueglobal/datatools-ui/pull/256/commits

 Comment by codecov-io
Thursday Nov 29, 2018 at 21:15 GMT

Codecov Report

Merging #256 into dev will decrease coverage by 0.05%.
The diff coverage is 4.31%.

@@           Coverage Diff            @@
##             dev    #256      +/-   ##
========================================
- Coverage   4.92%   4.86%   -0.06%
========================================
  Files        324     326       +2
  Lines      15361   15542     +181
  Branches    4636    4679      +43
========================================
  Hits         756     756
- Misses     12445   12589     +144
- Partials    2160    2197      +37

Impacted Files
Coverage Δ

lib/types/reducers.js
0% <ø> (ø)
:arrow_up:

lib/types/index.js
0% <ø> (ø)
:arrow_up:

lib/admin/components/UserAdmin.js
0% <0%> (ø)
:arrow_up:

lib/manager/components/DeploymentSettings.js
0% <0%> (ø)
:arrow_up:

lib/admin/actions/admin.js
0% <0%> (ø)
:arrow_up:

lib/admin/containers/ActiveUserAdmin.js
0% <0%> (ø)
:arrow_up:

lib/admin/reducers/servers.js
0% <0%> (ø)

lib/admin/components/ServerSettings.js
0% <0%> (ø)

lib/manager/util/deployment.js
0% <0%> (ø)
:arrow_up:

lib/manager/components/DeploymentPreviewButton.js
0% <0%> (ø)
:arrow_up:

... and 10 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 4d8de35...c1dd3d5. Read the comment docs.


Du decimal definitions

Fixes #18

Decimals are considered primitive types
Primitives inside a DU will include their 'format'
Added test

Thank you, @blakeSaucier, for your pull request, and apologies for the delayed response.


Sorald fails to print unedited top-level types in compilation unit with multiple types

Sniper printer throws an exception on printing InterruptedExceptionForTesting.java. It doesn't matter if Sorald repairs anything in the file, there's a crash anyway. I think it's related to the fact that there are multiple type definitions in the file. Will investigate in Spoon.

SerializableFieldProcessorTest.java appears to pose the same problem: multiple type definitions.

SerializableFieldProcessorTest.java appears to pose the same problem: multiple type definitions.

This is a combination of a bug in Sorald and a bug in Spoon.
In Sorald, we only print top-level types that have been edited. This means that a CU with multiple top-level types may be printed with fewer types than it should, if any of the top-level types have not been edited.
In Spoon, the sniper printer crashes when you try to print a subset of the top-level types of a CU.

This is a combination of a bug in Sorald and a bug in Spoon.
In Sorald, we only print top-level types that have been edited. This means that a CU with multiple top-level types may be printed with fewer types than it should, if any of the top-level types have not been edited.
In Spoon, the sniper printer crashes when you try to print a subset of the top-level types of a CU.

We can't use the JavaOutputProcessor, as its createJavaFile method has the following documentation:
	/**
	 * Creates the Java file associated to the given element. Splits top-level
	 * classes in different files (even if they are in the same file in the
	 * original sources).
	 */

We definitely don't want to print top-level types in the same file into different files.

We can't use the JavaOutputProcessor, as its createJavaFile method has the following documentation:
	/**
	 * Creates the Java file associated to the given element. Splits top-level
	 * classes in different files (even if they are in the same file in the
	 * original sources).
	 */

We definitely don't want to print top-level types in the same file into different files.

See also OUTPUT_MODE in Spoon. We have one mode for one file per top-level class and one mode for
keeping the original CU structure.

See also OUTPUT_MODE in Spoon. We have one mode for one file per top-level class and one mode for
keeping the original CU structure.

Thanks, I didn't now about that one. I might be able to use that to produce the output for our different printing modes. However, as we have some fairly peculiar printing needs, it might also be appropriate to keep the file-printing logic in Sorald itself.

Thanks, I didn't now about that one. I might be able to use that to produce the output for our different printing modes. However, as we have some fairly peculiar printing needs, it might also be appropriate to keep the file-printing logic in Sorald itself.


Flutter version 2.0.1 stable. Android build error

/C:/flutter/.pub-cache/git/flutter-cupertino-date-picker-38630701b92a4fd0b753f9ab38b3581a5645a629/lib/src/date_picker.dart:103:34: Error: No named parameter with the name 'shadowThemeOnly'.
theme: Theme.of(context, shadowThemeOnly: true),
^^^^^^^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/material/theme.dart:107:20: Context: Found this candidate, but the arguments don't match.
static ThemeData of(BuildContext context) {
^^
FAILURE: Build failed with an exception.

Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991

What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

I have same issue

I solved with different repo. https://github.com/winteragency/flutter-cupertino-date-picker.git.


Spike a /distributions endpoint in spec to reduce /version size

What
Fundamentally, we face an issue with the complexity of returning dcat:dataset and dcat:distribution details as one joined response while meeting API user expectations. The issue is the nested table_schema within the distribution within the dataset. Having 3 layers of nested document on /editions/ creates a very messy API, and suggests that at least one of those nested resources is a sub resource of another. As dcat:distribution is a known resource type, this is an attempt to see if the API could mirror that distinction while still providing utility for users.
This means /versions/ has no top level distribution or table_schema object, this is instead embedded like this
"_embedded": {
    "dimensions": [
      {
        "code_list": "string",
        "identifier": "string",
        "label": "string",
        "name": "string"
      }
    ],
    "distributions": [
      {
        "distributions": [
          {
            "checksum": "string",
            "@id": "string",
            "byte_size": "string",
            "media_type": "string",
            "download_url": "string"
          }
        ]
      }
    ]
  },

The dimensions list is there for census reasons, relocated from previous top level field.
But that more complete view of distributions and table_schema for CSV distros is available on a /distributions endpoint with this response type:
{
  "_links": {
    "self": {
      "href": "string"
    },
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    }
  },
  "count": 0,
  "limit": 0,
  "offset": 0,
  "total_count": 0,
  "@context": "string",
  "items": [
    {
      "checksum": "string",
      "described_by": "string",
      "table_schema": {
        "about_url": "string",
        "column": [
          {
            "component_type": "string",
            "datatype": "string",
            "name": "string",
            "title": "string"
          }
        ]
      },
      "@id": "string",
      "byte_size": "string",
      "media_type": "string",
      "download_url": "string",
      "etag": "string",
      "@type": "dcat:distribution",
      "_links": {
        "self": {
          "href": "string"
        },
        "version": {
          "href": "string",
          "id": "string"
        }
      }
    }
  ]
}

How to review
There are 3 main issues with this approach that I think I need feedback on:

LD users rely on information in the _embedded fields to get the full picture. I don't see this as too big an issue right now, we did accept that this was something we would trial and get feedback on, but we're leveraging it more so just flagging
These _embedded fields are changing between the /editions/ and /versions/ endpoints, despite being part of the same dcat:dataset resource being represented (/editions/ embeds versions and distributions, /versions/ embeds dimensions and distributions - just based on my best guess of what would be useful). On the one hand we said the HAL fields _embedded and _links are generated and so it's acceptable for these to change between endpoints, but if they're forming part of the dcat resource is that still the case?
Because we decided that _embedded fields should never be returned in list responses, calls to /editions and /versions will never include download links unless we revise this principle.

Who can review
@janderson2 @rossbowen

So on your points:

I'm still quite uncomfortable with the use of _embedded but I'll leave that at the door for a moment! - but proceeding with including it for now I think we can tell the JSON-LD context to "skip" over it (using @nest) and still use the distributions field from within it.

Agree those are the ones which would be useful, and I don't see an issue with them changing between editions and versions.

In the example above I've included the download_url field... I'd expect to see it as one of the "minimal" fields to include...so maybe an exception here. Or at least keep it in.

Having 3 layers of nested document on /editions/ creates a very messy API, and suggests that at least one of those nested resources is a sub resource of another.

So while I get that the response is long, I don't think it's too messy, at most we get code which looks like:
edition.distributions[0].table_schema.columns

// Or including embedded
edition._embedded.distributions[0].table_schema.columns

So there's a bit of nesting there, but I'd say that feels perfectly pleasant to use and navigate with. Personally I'd be a bit more annoyed with having to make another call. What we have shapes up into the sort of thing Google are looking for as part of their structured data SEO... they even go as far as throwing in the observations.
Another thought is, many users won't really appreciate the difference between a dataset and its distributions. Many analysts will say things like "a dataset has columns" which isn't how DCAT models it. So I don't think including a distribution along with its edition/version is a bad thing.
Assuming a structure roughly like this:
curl https://data.ons.gov.uk/datasets/cpih/editions/2022-01

{
  "@id": "https://data.ons.gov.uk/datasets/cpih/editions/2022-01",
  "@type": "dcat:Dataset",
  // some additional stuff here...
  "distributions": [
    {
      "@id": "https://data.ons.gov.uk/datasets/cpih/editions/2022-01.csv",
      "@type": "dcat:Distribution",
      "byte_size": 123456,
      "download_url": "https://data.ons.gov.uk/datasets/cpih/editions/2022-01.csv",
      "media_type": "text/csv",
      "table_schema": {
        "columns": [
          {
            "name": "area",
            "titles": "area",
            "datatype": "string",
            "label": "Area",
            "description": "The area of an observation."
          },
          {
            "name": "period",
            "titles": "period",
            "datatype": "string",
            "label": "Period",
            "description": "The period of an observation."
          },
          {
            "name": "sex",
            "titles": "sex",
            "datatype": "string",
            "label": "Sex",
            "description": "Biological sex of observed individuals."
          },
          {
            "name": "life_expectancy",
            "titles": "life_expectancy",
            "datatype": "decimal",
            "label": "Average life expectancy",
            "description": "Mean life expectancy of observed individuals."
          }
        ]
      }
    },
    {
      "@id": "https://data.ons.gov.uk/datasets/cpih/editions/2022-01.xlsx",
      "@type": "dcat:Distribution",
      "byte_size": 123456,
      "download_url": "https://data.ons.gov.uk/datasets/cpih/editions/2022-01.csv",
      "media_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
    }
  ],
  "versions": [
    {
      "@id": "https://data.ons.gov.uk/datasets/cpih/editions/2022-01/versions/1",
      "issued": "2022-01-01T00:00:00Z",
      "modified": "2022-01-01T00:00:00Z"
    },
    {
      "@id": "https://data.ons.gov.uk/datasets/cpih/editions/2022-01/versions/2",
      "issued": "2022-01-02T00:00:00Z",
      "modified": "2022-01-02T00:00:00Z"
    }
  ]
}


SQLite driver not supported

The pdo_sqlite driver doesn't work because the service provider is trying to grab values from nonexistent array keys (which are irrelevant for sqlite). Trying to use an sqlite driver raises Undefined index: host from LaravelDoctrineServiceProvider.php:143.
Maybe a simple if/else for now, as sqlite seems to be the odd one out?

sqlite was the first driver i supported when writing the configuration update. Did you provide a host in your configuration? Which branch are you running off of? Neither master or develop have line 143 that pertains to such an issue.

I'm on 0.4.3 as per suggested constraints for installation on the readme. The line in question is this one, and no, I didn't provide a host in the sqlite configurations because it's not a key in laravel's config, nor is it a key in doctrine's config.
I can try upgrading to 0.5.x and try again, perhaps?

Ahhh. Try one of the newer versions/dev. sqlite wasn't property supported back then :)

Is 0.5.x stable enough to use in general? I haven't installed it just yet, but it does look like it'll fix the issue.

It should be fine. Quite a few of us are using it in big projects atm, it's just that it's ongoing with lots of extra features/requirements coming.etc, so it can be unstable. Test, if it works - awesome :)
We should wrap it up when L5 is released.

Yep, looks like it. Thanks for the help! :)


How to use this with cmake ?

How can i integrate this library in my cmake project since DStruct use xmake ?

How can i integrate this library in my cmake project since DStruct use xmake ?

1.like headonly lib，add dstruct's root-dir to include search-dir in cmake

include dstruct.hpp in your program

use it

xmake only as build example's tool in dstruct

@ElCapor  I wrote a demo to auto-config for cmake project, you can try it. as follows:
CMakeLists.txt

cmake_minimum_required(VERSION 3.14)

project(dstruct_cmake_example)

include(FetchContent)

FetchContent_Declare(
  dstruct
  GIT_REPOSITORY https://github.com/sunrisepeak/DStruct.git
  GIT_TAG        main
)

FetchContent_MakeAvailable(dstruct)

FetchContent_GetProperties(dstruct)
set(DSTRUCT_INCLUDE_DIRS ${dstruct_SOURCE_DIR})

add_executable(dstruct_cmake_example main.cpp)

target_include_directories(dstruct_cmake_example PRIVATE ${DSTRUCT_INCLUDE_DIRS})

main.cpp
#include <iostream>
#include <dstruct.hpp>

int main() {
    dstruct::Array<int, 10> arr(2);

    decltype(arr)::ValueType val = 6;
    arr[0] = arr[-1] = val;

    for (int i = 0; i < arr.size(); i++) {
        std::cout << arr[-(i + 1)] << " : " << arr[i] << std::endl;
    }

    return 0;
}

Thank you very much i'm giving it a try tomorrow, very kind from you to help me !


Large contention in MSBuildNameIgnoreCaseComparer

MSBuildNameIgnoreCaseComparer exists to let the expander lookup "property names" keys without substring. It does so, however, in a manner that in my mind not ideal: it lets certain classes "setup" the offsets that it should be using to compare by muting fields on the static instance, which means that it needs to lock access to the class to avoid multiple threads partying on the same state. The act of calling Monitor.Enter is showing up on the radar, I do wonder if we a multi-proc build we'll see lots of contention here.
I think a better approach would to pass all that information down to RetrievableEntryHashSet and have it do the right comparison.

Going to dup this against: https://github.com/Microsoft/msbuild/issues/2434


 However, as soon as you search for a country, the currency is directly replaced by "undefined (undefined)".

After a bit of fiddling around, it seems to me that it's because the data is created in a computed properties, which overwrites the object country itself in the formatRawData
And if I understand stackoverflow  correctly, computed properties seem to be "call by reference" and thus modify the RawCountriesData  object. (but I can be completely wrong)
I would love to help and try to fix it. I'm not sure what the right approach is here though.

I could move the whole thing from computed to a method. However, I would have said it is correct in a computed.
I could map the whole object in the formatRawData into a completely new object so as not to touch the original object. But that's not nice either somehow.
A small if statement here  to check if it has already been converted

Do you have a suggestion or a better idea? 😅
Please let me know and I would be happy to create a pull request.

Heya @worldworm
Yay someone's actually using my project 🤗
Thank you for the very detailed bug report, your diagnosis is absolutely correct.
I think the easiest fix, is like you suggested, to just check if currencies is already an array, here. This should fix it:
+ if (!Array.isArray(country.currencies)) {
   Object.values(country.currencies).forEach((currencyObj) => {
     currencies.push(`${currencyObj.name} (${currencyObj.symbol})`);
   });
   country.currencies = currencies;
+ }

If you'd be up for submitting a PR, that'd be awesome. But otherwise I can implement this myself tomorrow morning :)


Contributing wiki page links to non-existent "WritingApiDocumentation"

https://github.com/dart-lang/sdk/wiki/Contributing links to https://github.com/dart-lang/sdk/wiki/WritingApiDocumentation.md which doesn't exist.

In addition to the previous content that was on the WritingApiDocumentation, please consider also adding a style guide which would include sentence tense, structure and words to avoid or use. I know there are a number of preferences in style for documentation but I'm horrible at remembering them :)

You mean like the Dart Doc Comments?

@srawlins Yes similar, but I'm thinking more expanded version of the "content" section of that article. Things such as preference for active voice (vs passive), etc. Particularly as they apply more stringently with the core API docs

https://en.wikiversity.org/wiki/Technical_writing_style has some good general tips for technical writing. We could point to that.

Oops, should have closed this.


Update Azure.Core to 1.8

Let's hold off this change until next week. I'll start an email thread.

Let's hold off this change until next week. I'll start an email thread.


chore(main): release 1.0.6

:robot: I have created a release beep boop
1.0.6 (2023-01-18)
update

update (9bcb5ac)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/School-of-Website-Engineering/Knock-Ding-Yanxuan/releases/tag/v1.0.6 :sunflower: