Add more description to Diagnostic[] in CodeActionContext specification

Hi!
I was looking into documentation for this request https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction and it is not really clear what should be inside the Diagnostic[] array in CodeActionContext. Which diagnostics should the client send? How detailed should be this diagnostics (like which fields does the server actually need)? What will happen if the client simply sends an empty array?
I've looked into https://github.com/Microsoft/TypeScript and if I'm not mistaken only errorCode is used there from the whole diagnostic (please correct me if I'm wrong), so sending all of it seems like too much.
Anyway, it would be really great if you could add more context to this part of specification.

@jzashch Note that this is simply my interpretation.

The client should send diagnostics that have a range that overlaps/contains the current text cursor/selection.

Each server behaves differently and may use more or less information then what is included in the diagnostic. I feel like as-is the client should simply send back the original diagnostic in its entirety in the event that the server expects everything. Note that one could however imagine a world where the server declares what it needs and the client can consume this information and only send back what is needed to save space over-the-wire (presumably mostly taken up by the message and relatedInformation fields.

That is a valid request. There may be code actions that are not related to an error (such as the generation of getters and setters, extract interface, extract method/function, remove unused field, and so on and so on...).

I've just hit this too. All the docs say are:

An array of diagnostics.

Each diagnostic has its own range - should we return fixes for all of them plus the one from CodeActionParams.range? Or only the ones relating to the diagnostics? Do we have any guarantees that the diagnostics are within the first range? What if there are diagnostics from a different text document - should we include code actions for them?
For now I'm going to completely ignore the diagnostics argument because it's not clear how to handle it, but I don't know if that's entirely a valid thing to do.

I'll second @DanTup that the spec is a bit fuzzy on the meaning of diagnostics and ranges and how they are supposed to interact in selecting 'matching' code actions.
What we ended up doing is to assume that if the list of Diagnostics is empty then only the range matters (this much seems obvious, as... what else could you do in that case). I assume this corresponds to a scenario where the client is querying for code actions in relation to an editor location. E.g. when we would press 'CTRL+1' in Eclipse to get codeactions / quickfixes for the current cursor position.
When the diagnostics list is not empty then we return just the quickfixes that directly associated with these specific diagnostics. We are assuming this kind of request arises in the context of something like a 'problems' view. In such a view, a user might click on or select a specific (set of) problem(s) and ask for a quickfix. So in this scenario we are really asking for fixes for a specific problem marker, not code actions for anything in a given range of text.
Our interpretation seems somewhat logical given those two expected use-cases, but none of these details are clear from reading the spec.

Here is what I think we should specify:

the primary parameter to compute code actions is the range.
the diagnostics provided should be the once the client now about and should overlap with the range (unless someone has a use case for diagnostics outside the range)
I think we should not propose to deduce the origin of the request from the provided diagnostics. VS Code for example sends them as well when the action is triggered in the editor. If we think we need an origin then we should add a corresponding property to the context.

Comments?

Am I right in thinking the purpose of providing them is just for convenience/performance for the server (eg. to avoid the server needing to re-compute diagnostics if it doesn't have them)?
If so, should it be stated that if the client sends them, it must include them all (so the server can trust that it doesn't need to go and figure them out again)?

the purpose of providing them is just for convenience/performance ..

Yes, that is my current thinking. I think that most servers will have the state internally anyways and will not use the provided information.

it must include them all (so the server can trust that it doesn't need to go and figure them out again)?

You mean all in the range ?

You mean all in the range ?

Sorry, yes :)
For the server to use them (if it doesn't already have them) it will want to be sure that they're complete, so if the array is present, the client should ensure it includes all diagnostics that intersect with the range provided.
Also - an empty array should probably signify that there definitely weren't any (to avoid the server having to recompute them if there were actually zero). If the client doesn't want to send them, it should not included the diagnostics (eg. they're undefined, and not an empty array).

If the client doesn't want to send them, it should not included the diagnostics (eg. they're undefined, and not an empty array).

The argument is not optional, so the client is forced to send them.

Oh yeah 😔 Changing that now is a breaking change too.

What's also confusing is that the diagnostics sent by the client with codeAction are in practice not the same as what was originally sent by the server. For example, VSCode will drop the 'severity' field when sending the diagnostics back.

For example, VSCode will drop the 'severity' field when sending the diagnostics back.

Interesting. That sounds like a bug then that should be filed with microsoft/vscode-languageserver-node then.

For example, VSCode will drop the 'severity' field when sending the diagnostics back.

Interesting. That sounds like a bug then that should be filed with microsoft/vscode-languageserver-node then.

Sorry I just noticed this is no longer the case for the latest vscode-languageserver-node

Yes, that is my current thinking. I think that most servers will have the state internally anyways and will not use the provided information.

Isn't it better for servers to use diagnostics sent by the client? I wonder if it's possible to have the following case:

Client receives and shows diagnostic dA.
Client issues code action request with dA as context.
Diagnostics state changes to dB and is sent from the server to the client.
Server sends code action based on dB (using its internal state).
Client receives code action suggestion from (4) but not the diagnostic message from (3) (packet loss maybe)

In this case client will show diagnostic dA with code action dB.

How do you imaging the diagnostic state changes in (3). If it is by typing in the editor or moving the cursors the LSP recommendation is that the client cancels the request (since its result might be outdated) and issues a new request.
Regarding packet loss: LSP has currently no way to recover from that. So at least the VS Code LSP implementation will restart the server if a connection gets into a unknown or error state.

How do you imaging the diagnostic state changes in (3). If it is by typing in the editor or moving the cursors the LSP recommendation is that the client cancels the request (since its result might be outdated) and issues a new request.

Right, I suppose that works if packet loss is out of scope. I can't find any other case where new diagnostics might be missed by the client.


number of columns is not respected

it seem that asciicast2gif does not respect the custom number of columns required and fallbacks to 80 or similar value when tmux was involved.
I mention that the the same recording behavers normal when played using asciinema, this behaviour being seen only when converting to gif. Use of -c param seems to have no effect.
Both files can be found at https://github.com/pycontribs/rmux/tree/master/docs
The command used to build the gif was asciicast2gif -S 2 -w 160 movie.cast movie.gif and while the total number of columns of the gif is 160 you can see around the half of the animation that when tmux split window starts it is cropped to ~100 columns.
If you try to play the same recording, it will display correctly.

Altering the virtual terminal size with -w / -h options makes sense only when the output is line-based, simple printing, e.g. invoking commands in your shell and getting some results printed. Terminal multiplexers like tmux or screen (or "full-screen" applications like vim) handle terminal sizing on their own, and the recorded session will have all the cursor movement and resulting ascii line drawing fixed in a way which can't be altered post-factum. In other words, when recording tmux you need to ensure the terminal size is exactly like you want it to be displayed later, either in web player on when rendered to gif.


how to reducer the params for fc layer in decoder?

hi @tancik
since the fc layer in decoder is too larger (13*13 * 128 * 500 = 10,816,000), so i want use a conv(dim=1024) to increase the dimension and then use tf.reduce_mean(x, axis=[1, 2]), but in the first 1w iterations, the bit_acc always gets around 0.5, and the str_acc gets zero. so how to reduce the params for the fc layer, at the same time, it can get good results?

hi @tancik
since the fc layer in decoder is too larger (13*13 * 128 * 500 = 10,816,000), so i want use a conv(dim=1024) to increase the dimension and then use tf.reduce_mean(x, axis=[1, 2]), but in the first 1w iterations, the bit_acc always gets around 0.5, and the str_acc gets zero. so how to reduce the params for the fc layer, at the same time, it can get good results?

Hey, is this problem solved?  @zimenglan-sysu-512


focus trap for BModals doesn't work anymore since v0.23.5

Describe the bug
Hi,
the focus trap for BModals no longer works since v0.23.5
Or is it disabled by default now?
Reverting to version v0.23.4 solves the issue.
Reproduction:

git clone https://github.com/tbl0605/boostrap-vue-next-bug
npm install
npm run serve
click on button "Open Modal"
use tab key

Reproduction
https://github.com/tbl0605/boostrap-vue-next-bug
Used Package Manager
npm
Validations

[X] Have tested with the latest version. This is still alpha version and sometime things change rapidly.
[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
[X] The provided reproduction is a minimal reproducible of the bug.

Hi @VividLemon,
thank you for your patch, focus trap seem to work again! ^^
I still have a question:
why did you add tabindex="0" in BModal.vue?
Focus traps should work without it no?
And the visual effect is pretty bad if you use <b-modal centered /> for example:

I updated https://github.com/tbl0605/boostrap-vue-next-bug so you can see what I mean.
Should I open a new issue?
Thank you!


Add libc_stubs functions

Summary
Add libc_stubs functions
Impact
Now users can call run functions that depend on system libc functions (i.e. hmac_md5())
Testing
esp32c3-devkit

MacOS is failing again...

MacOS is failing again...

Yes, but it is failing for valid reasons. The Linux RISC-V is also failing:
https://github.com/apache/incubator-nuttx/actions/runs/3536010561/jobs/5935599845

MacOS is failing again...

Yes, but it is failing for valid reasons. The Linux RISC-V is also failing: https://github.com/apache/incubator-nuttx/actions/runs/3536010561/jobs/5935599845

Yes, you are right, I missed that other failing. Fixed


Convert tryCatch to nAry (#318)

Coverage remained the same at 100.0% when pulling 504247be16c74c7ef529004a16216c05743680c2 on try-catch into 37542123e8f6d43ad5d020479fed3ac5cb758780 on master.

Sure, I'll get that in today.
On Sun, Oct 7, 2018, 8:35 AM Ian Hofmann-Hicks<EMAIL_ADDRESS>wrote:

@evilsoft approved this pull request.
This 👀 GTG!
As we are changing the interface for this, thinking it should be marked as
a Breaking Change.
We are going to do a 0.10.2 release with some features and a bug fix,
then this should go out with 0.11.0 which will be the release after this
next one.
What do you think about updating the documentation to make note of this
new super power?
[image: image]
https://user-images.githubusercontent.com/3665793/46579132-70501380-c9c0-11e8-91a2-8bc085cd3c4e.png
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/evilsoft/crocks/pull/320#pullrequestreview-162279156,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH4KbxK29XcKPP_FmmEmokDkHK8hcoLTks5uiaCYgaJpZM4XJ3pf
.


(gvim:17432): Gtk-WARNING **: 22:20:02.014: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)

Steps to reproduce
run gvim on fedora silverblue, in the terminal, I see loads of these warnings:
(gvim:17432): Gtk-WARNING **: 22:20:02.014: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)

Expected behaviour
no warnings in terminal
Version of Vim
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Nov 15 2024 00:00:00) Included patches: 1-866 Modified by<EMAIL_ADDRESS>Compiled by<EMAIL_ADDRESS>Huge version with GTK3 GUI.  Features included (+) or not (-): +acl                +cryptv             +fork()             +modify_fname       +persistent_undo    -sun_workshop       +viminfo +arabic             +cscope             +gettext            +mouse              +popupwin           +syntax             +virtualedit +autocmd            +cursorbind         -hangul_input       +mouseshape         +postscript         +tag_binary         +visual +autochdir          +cursorshape        +iconv              +mouse_dec          +printer            -tag_old_static     +visualextra -autoservername     +dialog_con_gui     +insert_expand      +mouse_gpm          +profile            -tag_any_white      +vreplace +balloon_eval       +diff               +ipv6               -mouse_jsbterm      -python             -tcl                +wildignore +balloon_eval_term  +digraphs           +job                +mouse_netterm      +python3/dyn-stable +termguicolors      +wildmenu +browse             +dnd                +jumplist           +mouse_sgr          +quickfix           +terminal           +windows ++builtin_terms     -ebcdic             +keymap             -mouse_sysmouse     +reltime            +terminfo           +writebackup +byte_offset        +emacs_tags         +lambda             +mouse_urxvt        +rightleft          +termresponse       +X11 +channel            +eval               +langmap            +mouse_xterm        +ruby/dyn           +textobjects        +xattr +cindent            +ex_extra           +libcall            +multi_byte         +scrollbind         +textprop           -xfontset +clientserver       +extra_search       +linebreak          +multi_lang         +signs              +timers             +xim +clipboard          -farsi              +lispindent         -mzscheme           +smartindent        +title              +xpm +cmdline_compl      +file_in_path       +listcmds           +netbeans_intg      +sodium             +toolbar            +xsmp_interact +cmdline_hist       +find_in_path       +localmap           +num64              +sound              +user_commands      +xterm_clipboard +cmdline_info       +float              +lua/dyn            +packages           +spell              +vartabs            -xterm_save +comments           +folding            +menu               +path_extra         +startuptime        +vertsplit +conceal            -footer             +mksession          +perl/dyn           +statusline         +vim9script    system vimrc file: "/etc/vimrc"      user vimrc file: "$HOME/.vimrc"  2nd user vimrc file: "~/.vim/vimrc"  3rd user vimrc file: "~/.config/vim/vimrc"       user exrc file: "$HOME/.exrc"   system gvimrc file: "$VIM/gvimrc"     user gvimrc file: "$HOME/.gvimrc" 2nd user gvimrc file: "~/.vim/gvimrc" 3rd user gvimrc file: "~/.config/vim/gvimrc"        defaults file: "$VIMRUNTIME/defaults.vim"     system menu file: "$VIMRUNTIME/menu.vim"   fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf- 2.0 -I/usr/include/atk-1.0 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cloudprovider s -I/usr/include/webp -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/fribidi -I /usr/include/libxml2 -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -DWITH_GZFILEOP -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -pthread -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-s ecurity -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 - march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -D_GNU_ SOURCE -D_FILE_OFFSET_BITS=64 -DSYS_VIMRC_FILE=/etc/vimrc -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -Wl,--build-id=sha1 -Wl,-z,relro -Wl,--as-needed -Wl,- z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/ lib/rpm/redhat/redhat-package-notes -L/usr/local/lib -o vim -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgd k_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lm -lselinux -lncurses -lcanberra -lsodium -lrt -lacl -lattr -lgpm
Environment
Linux fedora 6.11.8-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 14 20:38:18 UTC 2024 x86_64 GNU/Linux
$ echo $TERM
xterm-256color
GNOME Terminal
Version 3.50.1 for GNOME 45
A terminal emulator for the GNOME desktop
Using VTE version 0.76.4 +BIDI +GNUTLS +ICU +SYSTEMD
Logs and stack traces
No response

that is a known problem, that the GTK libraries are a bit chatty. This has been discussed several times already.
If you know how to fix those warnings, feel free to create a PR, otherwise this is non-actionable issue here.


Deprecate the StringTag.set() overload taking a StringTag.

It's not a common scenario to use a Tag key as the tag value. Would fix #229

Coverage remained the same at 81.515% when pulling 67538cf5cbb27d44b3a6c3ec9eff6a4a4e2e627c on carlosalberto:deprecate_stringtag_overload into 242ba956368c48b804ae4120053955a49f7f9c63 on opentracing:v0.32.0.

Merged as it's a rather simple (and obvious) change. Let me know if this needs to be undone later ;)

@carlosalberto fyi: this has been merged into the v0.32.0 branch but there have also already been merges into the master branch (#263, #264).

@cwe1ss Hey, yes, was wondering about that yesterday. I will back port this deprecation, as once as I get my mind on whats the best (direct cherry-pick or PR ;) )


St 48 dept back end

There is a problem with mocking the del() function of knex. Will discuss with Caleb tomorrow or tuesday. In the meantime, here is the code for the department backend.

This needs some polish on top and I need to discuss the authorization token with Caleb - but for the purposes of demo and sprint review I'm submitting this PR


when I modify batch_size larger than 1

batch[k] = torch.tensor([f[k] for f in features])
ValueError: expected sequence of length 37 at dim 1 (got 40)
It's seems like that the default_data_collator has some problem

Please share full logs and reproducible steps

File "/opt/conda/envs/python3.8.13/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 61, in fetch
return self.collate_fn(data)
File "/root/.local/lib/python3.8/site-packages/transformers/data/data_collator.py", line 70, in default_data_collator
return torch_default_data_collator(features)
File "/root/.local/lib/python3.8/site-packages/transformers/data/data_collator.py", line 136, in torch_default_data_collator
batch[k] = torch.tensor([f[k] for f in features])
ValueError: expected sequence of length 75 at dim 1 (got 81)

Please share full logs

I have the same problem for running on GPU. Full logs:
Traceback (most recent call last):
  File "/home/jovyan/Code/e5-mistral-7b-instruct/peft_lora_embedding_semantic_search.py", line 545, in <module>
    main()
  File "/home/jovyan/Code/e5-mistral-7b-instruct/peft_lora_embedding_semantic_search.py", line 469, in main
    for step, batch in enumerate(active_dataloader):
  File "/home/jovyan/.local/lib/python3.10/site-packages/accelerate/data_loader.py", line 451, in __iter__
    current_batch = next(dataloader_iter)
  File "/home/jovyan/.local/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
    data = self._next_data()
  File "/home/jovyan/.local/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 674, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/jovyan/.local/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 54, in fetch
    return self.collate_fn(data)
  File "/home/jovyan/.local/lib/python3.10/site-packages/transformers/data/data_collator.py", line 92, in default_data_collator
    return torch_default_data_collator(features)
  File "/home/jovyan/.local/lib/python3.10/site-packages/transformers/data/data_collator.py", line 158, in torch_default_data_collator
    batch[k] = torch.tensor([f[k] for f in features])
ValueError: expected sequence of length 503 at dim 1 (got 276)
[2024-02-02 13:19:15,678] torch.distributed.elastic.multiprocessing.api: [ERROR] failed (exitcode: 1) local_rank: 0 (pid: 14387) of binary: /usr/bin/python
Traceback (most recent call last):
  File "/home/jovyan/.local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/home/jovyan/.local/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
    args.func(args)
  File "/home/jovyan/.local/lib/python3.10/site-packages/accelerate/commands/launch.py", line 1008, in launch_command
    deepspeed_launcher(args)
  File "/home/jovyan/.local/lib/python3.10/site-packages/accelerate/commands/launch.py", line 724, in deepspeed_launcher
    distrib_run.run(args)
  File "/home/jovyan/.local/lib/python3.10/site-packages/torch/distributed/run.py", line 797, in run
    elastic_launch(
  File "/home/jovyan/.local/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 134, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
  File "/home/jovyan/.local/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 264, in launch_agent
    raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
peft_lora_embedding_semantic_search.py FAILED
------------------------------------------------------------
Failures:
  <NO_OTHER_FAILURES>
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
  time      : 2024-02-02_13:19:15
  host      : musing-chandrasekhar-0
  rank      : 0 (local_rank: 0)
  exitcode  : 1 (pid: 14387)
  error_file: <N/A>
  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

@Rinatum
Not able to reproduce the issue. Please try running the code in Docker
Suppose you are using a different dataset. Please share that also.

I solved the problem by a custom data collator_fn, and move data preprocess to collator_fn.


Refactor ProjectDao

Pull Request Test Coverage Report for Build 37

5 of 5 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+3.6%) to 60.417%

Totals

Change from base Build 35:
3.6%

Covered Lines:
29

Relevant Lines:
48

💛  - Coveralls


v22.5.9 update composer dependencies

Current coverage is 100% (diff: 100%)

Merging #617 into master will not change coverage

@@           master   #617   diff @@
====================================
  Files          29     29
  Lines         439    439
  Methods       111    111
  Messages        0      0
  Branches        0      0
====================================
  Hits          439    439
  Misses          0      0
  Partials        0      0

Powered by Codecov. Last update 1eff780...536db26


Property 'render' does not exist on type 'typeof Eta'.

Describe the bug
Typescript compilation errors out with

Property 'render' does not exist on type 'typeof Eta'.

To Reproduce
run this typescript with ts-node (typescript 5.1.3):
import { Eta } from "eta";

const res = Eta.render('Hi, my name is <%= it.name %>', { name: "Ben" });
console.log(res); // Hi Ben!

Expected behavior
I expect this to run and output text to the console
Screenshots

tt.ts:3:17 - error TS2339: Property 'render' does not exist on type 'typeof Eta'.

3 const res = Eta.render('Hi, my name is <%= it.name %>', { name: "Ben" });

Package & Environment Details

Environment: Node
Version: 19.8.1

@retorquere thanks for submitting the issue! You need to initialize an instance of Eta first, then call renderString (not render) on that instance.
import { Eta } from "eta";

const eta = new Eta()

const res = eta.renderString('Hi, my name is <%= it.name %>', { name: "Ben" });
console.log(res); // Hi Ben!

I thought I saw the old syntax in the docs, but I can't find it now.

@retorquere you probably did -- I had some troubles with publishing the new docs, so they weren't up to date when I released the package :sweat_smile:

This happens to me while using the latest syntax as well
Property 'renderString' does not exist on type 'Eta'.
The following test never succeeds.
import {Eta} from 'eta';
describe('[class] TemplateEngine', () => {
  test('sets up as eta', () => {

    const eta = new Eta()

    const res = eta.renderString('Hi, my name is <%= it.name %>', { name: "Ben" });
    expect(res).toStrictEqual("Hi Ben!")
  });
})

Node Version: v16.18.1

@daredoes you should probably change the last line's output :wink::
expect(res).toStrictEqual("Hi, my name is Ben")

Where are you getting the error that Property 'renderString' does not exist on type 'Eta'?

@nebrelbug it has something to do with my project's setup. I've gotten this to work by starting a project from scratch.
The error occurs when running jest against that file

I had the same problem as @daredoes. Setting typescript version to "5.1.3" did the job


Racing Improvements (2/2): D gain filtering

@MaEtUgR This adds a new filter for D-gain addition. It is NOT being used in the controller yet. The theory is that using a better estimate of the derivative we can go for a more aggressive rate controller tuning (PID instead of PI), which allows us to track rates more accurately.
This branch still contains a lot of instrumentation. Some of that would need to be removed before merging.
Thanks @bresch !

Sounds like a very good plan!!
@bresch I guess that's pretty new  Any tests already? Do you have it in real world use?

This is an initial flight test with this: http://logs.px4.io/plot_app?log=efe42194-6409-4ebe-91d2-e584340d9f22
Probably need to do some tuning with this in mind though.

Thanks! That log will be useful for plotting. @MaEtUgR Do you feel like enabling it for the D gain?

@MaEtUgR Yes, it is quite new but I already flew it several times but for logging only. Just to make sure it doesn't output anything crazy.

@bresch Can you default the controller to using the new filter?

@LorenzMeier The rates controller now uses the estimated derivative of the FOAW filters in the D term. The outputs of the filters are logged in mc_att_ctrl_status.

@nkhoit Thank you for the test! Could you try again with the latest modification? I don't need a big log, just hovering around with some high and low angular accelerations if possible will be perfect. Then I can tune the differentiator properly for you.

@bresch So this ended up making my vehicle unstable at first. I could only get it flyable once I zero'd out the rate_d gains.
(rate_d = 0.0007): http://logs.px4.io/plot_app?log=dec95b56-c4ec-4ccb-9b9f-7bda3290ffb6
(rate_d: 0.0007-->0): http://logs.px4.io/plot_app?log=0997c63d-beec-41ae-9ec2-e9a4c41c476f
(rate_p: 0.07-->0.03): http://logs.px4.io/plot_app?log=08a9c371-c845-449e-8326-5863129b7b50
Wasn't too sure how long I should be spending to tune this. So just dumping some logs for now in case there's something interesting that you can see. Because my gains are so different from master, I'm struggling with that more right now, so I can't see any differences yet besides that.

@nkhoit Thank you, I'll have a look.

@nkhoit I found the issue, the derivative was applied with a positive sign instead of a negative sign => positive feedback => unstable
It's fixed now.

Just as an initial test, it's stable now with derivative gain.
http://logs.px4.io/plot_app?log=c866c0ff-b907-4cd5-b145-e723c78a3afb

@nkhoit Cool, it looks to work properly now. However, since your gyro measurements are pretty clean (nice setup!), the delta tuning parameter of the filter can be reduced in order to reduce the delay. I should add a parameter to be able to modify it through QGC.

I increased my rate_p gains from 0.055~ --> 0.1
This has usually been unstable for me. But I was able to lower the delta parameter to get it stable with the same gains (I'm assuming it's these values here? https://github.com/PX4/Firmware/blob/8760f2fdcae2a0dcee638357c1497fe89563dab8/src/modules/mc_att_control/mc_att_control_main.cpp#L444)
delta = 0.025 --> http://logs.px4.io/plot_app?log=69590f59-a46f-4d92-a4b6-88a4b59549fa
delta = 0.01 --> http://logs.px4.io/plot_app?log=b2013dc6-0bab-42e2-8928-14f8961f0159
So, all I know is this parameter is doing something and I can play around with it.

@bresch I'm not sure what you did, but this branch is completely messed up in terms of commits - it has your commits multiple times in it. Is it possible you merged your feature branch into an already rebased version? I will squash this into a single commit to fix.

Replacement PR: #7698


Envoy v 1.19 XFF regression?

Title:  Envoy v 1.19 XFF regression?
Description:
We have observed regression in xff behaviour when upgrading to latest stable Envoy version 1.19.0. When xff_num_trusted_hops is greater than zero in http connection manager config and use_remote_address is set to true, according to Envoy documentation,  the trusted client address is the Nth address from the right end of XFF. This behaviour holds in previous Envoys versions, but not in 1.19.0.
Repro steps:
Configure Envoy v 1.18.x and v 1.19.0 http connection manager with xff_num_trusted_hops greater than 0 and use_remote_address set to true:
...
          original_ip_detection_extensions:
            - name: envoy.http.original_ip_detection.xff
              typed_config:
                "@type": "type.googleapis.com/envoy.extensions.http.original_ip_detection.xff.v3.XffConfig"
                xff_num_trusted_hops: 2
          use_remote_address: true

Spin up Envoy for each version with given config. Issue a curl command to an endpoint which dumps value of xff and real ip headers:
curl -k --resolve "noop-web.spotify.com:8443:<IP_ADDRESS>" -H "Host: noop-web.spotify.com" -H "X-Forwarded-For: <IP_ADDRESS>, <IP_ADDRESS>" -H "X-Real-IP: <IP_ADDRESS>"  https://noop-web.spotify.com:8443/v1/xff  -v

For Envoy version < 1.19.0 we get output:
< HTTP/2 200
...
< server: envoy
< via: HTTP/2 edgeproxy
<
XFF header: <IP_ADDRESS> #this is expected we set value of this header to same value as real ip
X-Real-IP header: <IP_ADDRESS>

For Envoy version 1.19.0 we get output:
< HTTP/2 200
...
< server: envoy
< via: HTTP/2 edgeproxy
<
XFF header: <IP_ADDRESS>
X-Real-IP header: <IP_ADDRESS>

It looks like there is a regression in latest Envoy release and it falls back to using the immediate downstream connection’s source address as trusted client address even though the number of hops in xff header is >= to configured value of xff_num_trusted_hops.
Config:
Full config can be included upon request.

@nezdolik does it work if instead of doing:
          original_ip_detection_extensions:
            - name: envoy.http.original_ip_detection.xff
              typed_config:
                "@type": "type.googleapis.com/envoy.extensions.http.original_ip_detection.xff.v3.XffConfig"
                xff_num_trusted_hops: 2
          use_remote_address: true

you do:
   xff_num_trusted_hops: 2
   use_remote_address: true

?
That is you use the deprecated field xff_num_trusted_hops.

Thanks for the report! We can follow-up here: #17554.

Thanks @nezdolik let's track in the other issue.


Fix showing not found page after deleting a workspace

Details

This PR fixes showing not found page after deleting a workspace.
Fixed Issues

$ https://github.com/Expensify/App/issues/38301#issuecomment-1998027303
PROPOSAL: N/A
Tests

[ ] Verify that no errors appear in the JS console

Launch New Expensify app.
Go to Profile > Workspaces > any workspace.
Go to Profile.
Tap Delete.
Delete the workspace.
Verify that we navigated to the All workspaces page.

Offline tests

N/A
QA Steps

Same as tests
PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/47774969/64e10b22-301a-4285-812d-1e4096b5f47c

Android: mWeb Chrome

https://github.com/Expensify/App/assets/47774969/bc1080f0-b67a-48f0-aa2e-0636f3e3dcd1

iOS: Native

https://github.com/Expensify/App/assets/47774969/c76525fa-5a5c-4797-8876-72cad26d10de

iOS: mWeb Safari

https://github.com/Expensify/App/assets/47774969/490730cb-b48e-43ba-b535-a5e7a0e320e9

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/47774969/77a42594-4d83-4803-a2c9-1916da7b46a6

MacOS: Desktop

https://github.com/Expensify/App/assets/47774969/fcf6ba81-66d8-4e4a-9a25-ddec6ea0d536

@WojtekBoman Please upload Screenshots/Videos for all the platforms

@jayeshmangwani Done :)

I've tried to reproduce that, but it seems to work fine. Am I doing something wrong? I've noticed on your video that you still have the deleted workspace on the list, for me it disappears right after deletion. I've merged the latest main into this branch, maybe it impacts somehow
https://github.com/Expensify/App/assets/47774969/33198024-faa2-42b0-a0da-e63d57587c64

@WojtekBoman can you please try with below steps (I have updated the first step)

Go to the workspace that we going to delete > Now go offline
Press Reimbursements > Copy the URL
Press workspace Profile > Press Delete
Go to any chat paste the workspace reimbursements URL and send
Press the link, it will show the reimbursements page and we can edit the Rate

You need to be offline to reproduce this issue

I've added the fix and now it should work fine in offline mode :) However, there is still one issue with the navigation history after deleting a workspace created from the workspace switcher, but it will no longer appear once I finish fixing this issue
https://github.com/Expensify/App/assets/47774969/daad8510-8b41-4e35-b2d0-f5dfa5b88647

@WojtekBoman Can we please update the Tests steps like this:

Launch New Expensify app.
Go to Profile > Workspaces > any workspace.
Go to Profile.
Tap Delete.
Delete the workspace.
Verify that we navigated to the All workspaces page.

Note: your attached videos does not reflect the original steps of reproduction steps

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
https://github.com/Expensify/App/assets/35371050/020042af-44c8-4372-8fc9-cf2157dc34b1

Android: mWeb Chrome
https://github.com/Expensify/App/assets/35371050/631f757f-2a1a-4072-8260-6a70840635ac

iOS: Native
https://github.com/Expensify/App/assets/35371050/a7a7d81f-6bf9-4c5f-a71b-39d288885f29

iOS: mWeb Safari
https://github.com/Expensify/App/assets/35371050/f72a6e97-f0e1-48ad-962c-ecbe5e6d5d99

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/35371050/96a845a6-9e96-4d24-91f4-53c2b4965f7d

MacOS: Desktop
https://github.com/Expensify/App/assets/35371050/19491c2a-ea9c-4876-9a78-d549fbe78be4

@mountiny At the time of testing the PR we're facing another issue and Same issue is happens on staging, so we've not handled this in this PR, steps to reproduce issue

Go to workspace switcher > create a workspace
Go to workspace profile > Delete
We are navigating to All workspaces > Press back button

Now we can see a not found page instead of the going back to Home page(Chats)

This issue will be fixed by this PR

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/pecanoro in version: 1.4.56-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.56-8 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Cannot closed programatically opened modals by clicking on 'x'

Clicking on the close button of models opened via JS initialization does not work.
To Reproduce
Steps to reproduce the behavior:
Initialize a modal via JS
https://flowbite.com/docs/components/modal/#example
Open the model and to close it by clicking on the 'x' button at the top right corner.
Expected behavior
modal should close
Desktop (please complete the following information):

OS: Windows 10
Browser: Chrome
Version: 116.0.5845.140

Same issue here.
The close button only works when the modal is initialized via data HTML attributes, otherwise, if the exact modal is initialized via javascript (new Modal()) the close buttons do not fire any action.

Hey @pavitrakumar78 @azeiteiro,
With the new Instance Manager from Flowbite v2.0 you can now access the modal instance even if it's created via data attributes.
Please check out the following resources:
https://flowbite.com/docs/getting-started/javascript/
https://github.com/themesberg/flowbite/issues
Cheers,
Zoltan


verbments does not see build directory

@beninidavide You added in 8bdd5313803dd47e33dc3909a12e2e306a8b3ff6 output in BUILDDIR, but that directory is not visible by verbments package:
\usepackage{verbments}
...
\begin{frame}[fragile]
\frametitle{Foo}
\begin{pyglist}[language=java]
// Hello Java program
\end{pyglist}
\end{frame}

fails: ! LaTeX Error: File iputils-project-introduction.pyg.vrb' not found. because iputils-project-introduction.pyg.vrb is in the root directory, not in build directory but in root directory.
Test on this:
diff --git Makefile Makefile
index 26b3e79..cef7f98 100644
--- Makefile
+++ Makefile
@@ -12,7 +12,7 @@ all: documents screenshots
 documents: $(DOCUMENTS)

 $(BUILDDIR)/%.pdf: %.tex | $(BUILDDIR)
-       xelatex -interaction=nonstopmode -output-directory=$(BUILDDIR) $<
+       xelatex -interaction=nonstopmode -shell-escape -output-directory=$(BUILDDIR) $<

 screenshots:   $(SCREENSHOTS)

diff --git example.tex example.tex
index d3e02f9..10e2674 100644
--- example.tex
+++ example.tex
@@ -2,6 +2,7 @@
 \usepackage[T1]{fontenc}
 \usepackage[utf8]{inputenc}
 \usepackage{listings}
+\usepackage{verbments}

 \title{Presentation Title}
 \date{July 25, Nuremberg}
@@ -14,6 +15,13 @@
 \titlepage
 \end{frame}

+\begin{frame}[fragile]
+\frametitle{\File{ping}}
+\begin{pyglist}[language=java]
+// Hello Java program
+\end{pyglist}
+\end{frame}
+
 \begin{frame}[fragile]
 \frametitle{Presentation Title}
 \framesubtitle{This is \textit{a subtitle}.

Uh, first time I hear about verbments, last update in 2011. lstlisting seems like a better choice anyway.

Agree. I used in the past minted, but even with -shell-escape it did not work. And verbments was said to be minted replacement, but obviously it's not true ( minted is actively maintained). But minted also did not work for me even with -shell-escape.


Build failure: ananicy-cpp

Steps To Reproduce
Steps to reproduce the behavior:

nix-build -A ananicy-cpp on master (f8aa427967411ed1843040134f742d68fa400f73)

Build log

Build Log
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/nmmxl1ai13j7nhyf1khzyakv66j5yj8g-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/x0ag56d2hv9c362z15sq2rxarjq5dz6y-allow-regex-pattern-matching.patch
patching file .gitlab-ci.yml
patching file CMakeLists.txt
patching file cmake/StandardProjectSettings.cmake
patching file include/core/rules.hpp
patching file install-deps.sh
patching file src/rules.cpp
patching file src/tests/CMakeLists.txt
patching file src/tests/unit-utility.cpp
patching file include/utility/regex_utils.hpp
patching file src/regex_utils.cpp
applying patch /nix/store/ygnzmpz15j185n09r6gmc9hfd1c5dmb6-match-wrappers.patch
patching file src/worker.cpp
applying patch /nix/store/1zcm1njizcg2fkc14bfp1wnfqf1qqi5x-reliable-mounts-file.patch
patching file src/platform/linux/cgroups.cpp
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/share/doc/ananicy-cpp -DCMAKE_INSTALL_INFODIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/include -DCMAKE_INSTALL_SBINDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/xl0vlc2wdchfbq8536zs19pj2r3xdmma-clang-wrapper-19.1.5/bin/strip -DCMAKE_RANLIB=/nix/store/xl0vlc2wdchfbq8536zs19pj2r3xdmma-clang-wrapper-19.1.5/bin/ranlib -DCMAKE_AR=/nix/store/xl0vlc2wdchfbq8536zs19pj2r3xdmma-clang-wrapper-19.1.5/bin/ar -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/nix/store/bkzm3ab38iamay6abm9d4dxlarxg9ryv-ananicy-cpp-1.1.1 -DBPF_BUILD_LIBBPF:BOOL=FALSE -DENABLE_REGEX_SUPPORT:BOOL=TRUE -DENABLE_SYSTEMD:BOOL=TRUE -DUSE_BPF_PROC_IMPL:BOOL=TRUE -DUSE_EXTERNAL_FMTLIB:BOOL=TRUE -DUSE_EXTERNAL_JSON:BOOL=TRUE -DUSE_EXTERNAL_SPDLOG:BOOL=TRUE -DVERSION:STRING=1.1.1
Version: 1.1.1
-- version for cmake: 1.1.1
-- The CXX compiler identification is Clang 19.1.5
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/xl0vlc2wdchfbq8536zs19pj2r3xdmma-clang-wrapper-19.1.5/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking compiler flags support
-- Performing Test CXX_ACCEPTS_G3
-- Performing Test CXX_ACCEPTS_G3 - Success
-- Performing Test CXX_ACCEPTS_G
-- Performing Test CXX_ACCEPTS_G - Success
-- Performing Test CXX_ACCEPTS_OG
-- Performing Test CXX_ACCEPTS_OG - Success
-- Performing Test CXX_ACCEPTS_MARCH_NATIVE
-- Performing Test CXX_ACCEPTS_MARCH_NATIVE - Success
-- Performing Test CXX_ACCEPTS_THIN_LTO
-- Performing Test CXX_ACCEPTS_THIN_LTO - Failed
-- Performing Test CXX_ACCEPTS_WHPR_VTABLE
-- Performing Test CXX_ACCEPTS_WHPR_VTABLE - Failed
-- Performing Test CXX_ACCEPTS_STRICT_VTABLE
-- Performing Test CXX_ACCEPTS_STRICT_VTABLE - Success
-- [ccache] Disabled.
-- [cppcheck] Disabled.
-- [clang-tidy] Disabled.
-- [iwyu] Disabled.
CMake Warning at cmake/CPM.cmake:61 (message):
  Your project is using an unstable development version of CPM.cmake.  Please
  update to a recent release if possible.  See
  https://github.com/cpm-cmake/CPM.cmake for details.
Call Stack (most recent call first):
  CMakeLists.txt:18 (include)

-- Linux system detected, adding specific sources files
-- Configuring threads
-- [threads] Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- [threads] Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- [threads] Found Threads: TRUE
-- Configuring nlohmann_json
-- [nlohmann_json] Found nlohmann_json: /nix/store/75a52g5kjbx98i6srxvl3prbpkhndjci-nlohmann_json-3.11.3/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.3", minimum required is "3.9")
-- [fmtlib] Configuring fmtlib
[fmtlib] Using external fmtlib
-- [pcre2] Configuring pcre2
-- [pcre2] Found PkgConfig: /nix/store/0d4m43yp69lrm8imxbqgl9zxjwwz52jw-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- [pcre2] Checking for module 'libpcre2-8'
-- [pcre2]   Found libpcre2-8, version 10.44
-- [spdlog] Configuring spdlog
[spdlog] Using external spdlog
-- Configuring systemd
-- The C compiler identification is Clang 19.1.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/xl0vlc2wdchfbq8536zs19pj2r3xdmma-clang-wrapper-19.1.5/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found clang version: 19.1.5
-- Found LibBpf: /nix/store/7x2jlhj9wjjg4b5azjyphkl853c142ri-libbpf-1.4.7/lib/libbpf.so
-- Found BpfObject: /nix/store/19rv2vl9dnxyxa9r76k7kj3jhkfr6bml-bpftools-6.12/bin/bpftool
-- BPF system include flags: -idirafter /nix/store/nd72mapx3gzc789k06gyz2wl20q3jj8m-compiler-rt-libc-19.1.5-dev/include -idirafter /nix/store/jwrmbs5kcc92wv824xhxpypcj1iihl83-pcre2-10.44-dev/include -idirafter /nix/store/f9b0zf1ff2h2jhvcddllp1hjwhnfsyi7-spdlog-1.14.1-dev/include -idirafter /nix/store/bidr7f7bayhc3ixfpckrl43rmlkkf4vx-fmt-10.2.1-dev/include -idirafter /nix/store/75a52g5kjbx98i6srxvl3prbpkhndjci-nlohmann_json-3.11.3/include -idirafter /nix/store/ixwyfddsia31qxchy5rjm3nz0j0f4011-systemd-256.8-dev/include -idirafter /nix/store/1lggwqzapn5mn49l9zy4h566ysv9kzdb-zlib-1.3.1-dev/include -idirafter /nix/store/7x2jlhj9wjjg4b5azjyphkl853c142ri-libbpf-1.4.7/include -idirafter /nix/store/wk9dg3asb56f6kdi6v6hxrh03shick2d-elfutils-0.192-dev/include -idirafter /nix/store/xl0vlc2wdchfbq8536zs19pj2r3xdmma-clang-wrapper-19.1.5/resource-root/include -idirafter /nix/store/kj8hbqx4ds9qm9mq7hyikxyfwwg13kzj-glibc-2.40-36-dev/include
-- BPF target arch: x86
-- Configuring done (3.6s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_POLICY_DEFAULT_CMP0025

-- Build files have been written to: /build/source/build
cmake: enabled parallel building
cmake: enabled parallel installing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j16 SHELL=/nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/bash
[  4%] [clang] Building BPF object: ananicy_cpp
clang: warning: argument unused during compilation: '--gcc-toolchain=/nix/store/l89iqc7am6i60y8vk507zwrzxf0wcd3v-gcc-14-20241116' [-Wunused-command-line-argument]
[  8%] [skel]  Building BPF skeleton: ananicy_cpp
[ 12%] Building C object libananicycpp_bpf/CMakeFiles/ananicy_cpp_bpf_c.dir/src/bpf_program_utils.c.o
[ 20%] Building C object libananicycpp_bpf/CMakeFiles/ananicy_cpp_bpf_c.dir/src/btf_helpers.c.o
[ 20%] Building C object libananicycpp_bpf/CMakeFiles/ananicy_cpp_bpf_c.dir/src/uprobe_helpers.c.o
[ 25%] Building C object libananicycpp_bpf/CMakeFiles/ananicy_cpp_bpf_c.dir/src/trace_helpers.c.o
[ 29%] Linking C static library libananicy_cpp_bpf_c.a
[ 29%] Built target ananicy_cpp_bpf_c
[ 33%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/main.cpp.o
[ 37%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/rules.cpp.o
[ 41%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/utility/argument_parsing/argument_parser.cpp.o
[ 45%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/utils.cpp.o
[ 50%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/config.cpp.o
[ 54%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/worker.cpp.o
[ 58%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/regex_utils.cpp.o
[ 62%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/utility/argument_parsing/argument.cpp.o
[ 66%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/linux/process.cpp.o
[ 70%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/linux/backtrace.cpp.o
[ 75%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/linux/priority.cpp.o
[ 79%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/linux/process_info.cpp.o
[ 83%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/linux/cgroups.cpp.o
[ 87%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/systemd/service.cpp.o
[ 91%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/linux/debug.cpp.o
[ 95%] Building CXX object CMakeFiles/ananicy-cpp.dir/src/platform/linux/singleton_process.cpp.o
In file included from /build/source/src/platform/linux/process.cpp:5:
In file included from /build/source/include/core/process.hpp:13:
In file included from /build/source/include/utility/synchronized_queue.hpp:15:
/build/source/include/utility/atomic_queue/atomic_queue.h:396:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  396 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:402:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  402 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
/build/source/include/utility/atomic_queue/atomic_queue.h:524:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  524 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:530:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  530 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
In file included from /build/source/src/platform/linux/process_info.cpp:2:
In file included from /build/source/include/core/process.hpp:13:
In file included from /build/source/include/utility/synchronized_queue.hpp:15:
/build/source/include/utility/atomic_queue/atomic_queue.h:396:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  396 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:402:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  402 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
/build/source/include/utility/atomic_queue/atomic_queue.h:524:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  524 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:530:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  530 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
In file included from /build/source/src/main.cpp:7:
In file included from /build/source/include/core/process.hpp:13:
In file included from /build/source/include/utility/synchronized_queue.hpp:15:
/build/source/include/utility/atomic_queue/atomic_queue.h:396:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  396 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:402:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  402 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
/build/source/include/utility/atomic_queue/atomic_queue.h:524:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  524 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:530:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  530 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
In file included from /build/source/src/worker.cpp:5:
In file included from /build/source/include/core/worker.hpp:9:
In file included from /build/source/include/core/process.hpp:13:
In file included from /build/source/include/utility/synchronized_queue.hpp:15:
/build/source/include/utility/atomic_queue/atomic_queue.h:396:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  396 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:402:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  402 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
/build/source/include/utility/atomic_queue/atomic_queue.h:524:31: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  524 |         return Base::template do_pop_any(states_[index], elements_[index]);
      |                               ^
/build/source/include/utility/atomic_queue/atomic_queue.h:530:24: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  530 |         Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
      |                        ^
4 errors generated.
make[2]: *** [CMakeFiles/ananicy-cpp.dir/build.make:202: CMakeFiles/ananicy-cpp.dir/src/platform/linux/process.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
4 errors generated.
make[2]: *** [CMakeFiles/ananicy-cpp.dir/build.make:118: CMakeFiles/ananicy-cpp.dir/src/worker.cpp.o] Error 1
4 errors generated.
make[2]: *** [CMakeFiles/ananicy-cpp.dir/build.make:76: CMakeFiles/ananicy-cpp.dir/src/main.cpp.o] Error 1
4 errors generated.
make[2]: *** [CMakeFiles/ananicy-cpp.dir/build.make:272: CMakeFiles/ananicy-cpp.dir/src/platform/linux/process_info.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/ananicy-cpp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Additional context

Also, one of the dependencies fails: schedtool
Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.2-zen1, NixOS, 25.05 (Warbler), 25.05.20241219.d70bd19`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.92.0-dev-pre20241211-92ed9fe
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/perchun/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/perchun/.nix-profile/etc/xdg/nix/nix.conf:/home/perchun/.local/state/nix/profile/etc/xdg/nix/nix.conf:/home/perchun/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/perchun/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/hd8gdx3wk23c3vdql1091bbm7wcrhfhy-lix-2.92.0-dev-pre20241211-92ed9fe/share`
 - nixpkgs: `/etc/nix/path/nixpkgs`

Notify maintainers

@abbradar @artturin @johnrtitor @diniamo

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]

Looks like an LLVM issue. Compiles fine with llvm_18.
Upstream issue: https://github.com/llvm/llvm-project/issues/94049
Apparently got fixed with https://github.com/llvm/llvm-project/pull/94204
CC @NixOS/llvm @RossComputerGuy can we cherry-pick this onto llvm_19?

BTW, ananicy NixOS module requires ananicy (not -cpp) even if ananicy.package set to something else. And ananicy fails because its dependency schedtool didn't update for seven years.
https://github.com/NixOS/nixpkgs/blob/d70bd19e0a38ad4790d3913bf08fcbfc9eeca507/nixos/modules/services/misc/ananicy.nix#L124

What do you mean requires? I use it with cpp

Yeah the module fetches the rules from ananicy package, which couldn't be built due to schedtool build error.


Replay fails but Resync Succeeds

48518ms thread-0   chain_plugin.cpp:217          plugin_startup       ] 3020000 block_validate_exception: block validation exception
wrong producer schedule version specified
    {}
    thread-0  chain_controller.cpp:1431 validate_block_header

    {"next_block.block_num()":123}
    thread-0  chain_controller.cpp:958 __apply_block
448518ms thread-0   chain_plugin.cpp:217          plugin_startup       ] my->genesis_file.generic_string(): /Users/dlarimer/Library/Application Support/eosio/nodeos/config/genesis.json
448518ms thread-0   main.cpp:95                   main                 ] 3020000 block_validate_exception: block validation exception
wrong producer schedule version specified
    {}
    thread-0  chain_controller.cpp:1431 validate_block_header

    {"next_block.block_num()":123}
    thread-0  chain_controller.cpp:958 __apply_block
rethrow
    {"my->genesis_file.generic_string()":"/Users/dlarimer/Library/Application Support/eosio/nodeos/config/genesis.json"}
    thread-0  chain_plugin.cpp:217 plugin_startup
Segmentation fault: 11

The following ATC is used to test this issue:

Create new producers account and set them to become producers
Wait until the new schedule effective
Wait until the round of the effective new schedule ends
Shut nodeos
Run with --replay option

Verified that the nodeos can replay successfully (while it fails before #2157 is merged).


Convert FilePath field in flags from string to string array

Checklist

[x] Are you running the latest v2 release? The list of releases is here.
[x] Did you check the manual for your release? The v2 manual is here
[x] Did you perform a search about this feature? Here's the Github guide about searching.

What problem does this solve?
A clear and concise description of what problem this feature would solve. For example:

I am suggesting the FilePath option in all flags should be converted to a string array.

Solution description
A detailed description of what you want to happen.
Today, the FilePath option for all flags is a string. You can use it as an array by doing comma-separated paths within the field. In v1 EnvVar and FilePath were consistent where you could specify an array of environment names separated by commas. I believe the value in converting FilePath to a string array is to maintain consistency for the users setting defaults on the flag options.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Another option I see is leaving it the way it is but one could argue the user experience isn't consistent between setting config for EnvVar and FilePath.

@kneal  do you have any examples that utilize this behavior? Since this is a breaking change I would likely target for v3


Laravel 5.2.24. Class HandlePreflight does not work for OPTIONS request

When sending the OPTIONS request no headers are sent back.
As I can see, the following code in HandlePreflight:
if ($this->cors->isPreflightRequest($request) && $this->hasMatchingCorsRoute($request)) {
    $preflight = $this->cors->handlePreflightRequest($request);
    $response->headers->add($preflight->headers->all());
}

doesn't work, and no headers are added to the response.
The solution I found is to add to AppServiceProvider's boot method call for the HandlePreflightSimple class, and now its work!
    public function boot(Request $request, Kernel $kernel)
    {
        if ($request->isMethod('OPTIONS')) {
            $kernel->prependMiddleware(HandlePreflightSimple::class);
        }
    }

PS
The problem seems to be only when using CORS within the $middlewareGroups.
Solution: add HandleCors class to the global $middleware section.

Confirmind the issue.
Same issue here on lumen "version": "v5.1.6", cors: "version": "v0.8.0".

I confirm :+1:

I'm also experiencing this issue, has been easily fixed for my project by adding 'HandleCors' to '$middleware' as @dominikveils wrote.

I'm using laravel 5.2, putting \Barryvdh\Cors\HandleCors::class in global middle resolves the issue. What seems to be the problem?

Also experiencing the issue on Laravel v5.2.29. Adding it to the global middleware does solve the issue, but I'd much rather put it on a middleware group.

Using laravel 5.2.39 here and faced this same issue.
This fix saved my day, thanks @dominikveils
Edit App\Http\Kernel.php and add \Barryvdh\Cors\HandlePreflightSimple::class to $middleware array.

Hey guys. I am having a similar sort of issue however it is only an issue when making requests from my localhost to the live server. I have Production server serving data to an Ionic app. When running the ionic app in the simulator or using Ionic View the CORS works fine. But when testing the app with ionic serve in my browser from local host I get the error below.
Response for preflight has invalid HTTP status code 405
Any idea why this would be happening for localhost only?
Laraval v5.2
Thanks in advance.

Ignore my comment above. For anyone else having similar issues the issue turned out to be some strange deny's that somehow crept into the htaccess file. I replaced the .htaccess with the one from the laravel git repo and all is working :-)

is this resolved already?

Anything happening on this issue?


Standard to index name and ForeignKey

Implemented ForeignKLey creation and changed index name.

File in wrong place.


DefaultDeleter now deletes read-only files on Windows

Resolves #26539 and #26912
Needs proper test coverage and Platform check for better performance
Context

Contributor Checklist

[x] Review Contribution Guidelines
[x] Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
[x] Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
[x] Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
[ ] Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
[x] Provide unit tests (under <subproject>/src/test) to verify logic
[ ] Update User Guide, DSL Reference, and Javadoc for public-facing changes
[x] Ensure that tests pass sanity check: ./gradlew sanityCheck
[x] Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

Reviewing cheatsheet
Before merging the PR, comments starting with

❌ ❓must be fixed
🤔 💅 should be fixed
💭 may be fixed
🎉 celebrate happy things

@bot-gradle merge

The merge queue build has started. Click here to see all failures if any.


Error with Anki Import

Used the newest release from 12 days ago.
Error here:
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2022-01-09 00:50:39
Caught exception:
Traceback (most recent call last):
File "C:\Users\mashi\AppData\Roaming\Anki2\addons21\memrise2anki\importer.py", line 884, in importCourse
model = self.modelMapper.getModel(thing, deck)
File "C:\Users\mashi\AppData\Roaming\Anki2\addons21\memrise2anki\importer.py", line 384, in getModel
self.__fillModelSelection()
File "C:\Users\mashi\AppData\Roaming\Anki2\addons21\memrise2anki\importer.py", line 263, in __fillModelSelection
for name in sorted(self.col.models.all_names()):
AttributeError: 'ModelManager' object has no attribute 'all_names'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\mashi\AppData\Roaming\Anki2\addons21\memrise2anki\importer.py", line 950, in importCourse
raise exc_info0.with_traceback(exc_info[2])
File "C:\Users\mashi\AppData\Roaming\Anki2\addons21\memrise2anki\importer.py", line 884, in importCourse
model = self.modelMapper.getModel(thing, deck)
File "C:\Users\mashi\AppData\Roaming\Anki2\addons21\memrise2anki\importer.py", line 384, in getModel
self.__fillModelSelection()
File "C:\Users\mashi\AppData\Roaming\Anki2\addons21\memrise2anki\importer.py", line 263, in __fillModelSelection
for name in sorted(self.col.models.all_names()):
AttributeError: 'ModelManager' object has no attribute 'all_names'

You should update Anki, the latest version is 2.1.49


fix: cursor edge detection in fullscreen

Describe your PR, what does it fix/add?
Hyprland only allows a minimum hotspot_padding of 1px. This causes some problems when in fullscreen, as the cursor cannot reach the monitor edge, which breaks functionality of some programs (e.g. firefox; see issue #6600). This pr sets the minimum down to 0px.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Is it ready for merging, or does it need work?
ready

needs a clang-format

https://github.com/hyprwm/Hyprland/pull/6027 has the same fix, and it has been ready to merge for long time ago

Sorry, my bad. Didn’t realize this was a duplicate.


Add test for NaN handling

NaN Handling test
Unit test to check that NaNs on incoming SAF data are correctly handled during stretch_image; mostly tests forest/geo.py but AFAIK only affects SAF data. (basically tests commit 05962ec )
Check list
Handy reminders of things to do ahead of merge

[ ] Bump version number to reflect change, edit forest/__init__.py
(Use semantic version x.y.z where x is major, y is feature, z is patch)

@eardkdw thanks for the contribution, a valuable test given the context of the Hackathon with plenty of head scratching moments. I'll merge it in now


Detected an entry for myRequestLogger in sails.config.http.middleware.order, but sails.config.http.middleware['myRequestLogger'] is undefined or not a function. Please provide a custom req, res, next middleware function for myRequestLogger, or remove it from the order. See http://sailsjs.com/docs/concepts/middleware for more info.

Now i get it, the part with the config files.
now, my question is, whats that mean.?  does anybody have an idea?
 info: Starting app...

error:
error:
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Detected an entry for `myRequestLogger` in `sails.config.http.middleware.order`,
but `sails.config.http.middleware['myRequestLogger']` is undefined or not a function.
Please provide a custom `req, res, next` middleware function for `myRequestLogger`,
or remove it from the order. See http://sailsjs.com/docs/concepts/middleware for more info.
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

error: Could not load Sails app.
error:
error: Tips:
error:  • First, take a look at the error message above.
error:  • Make sure you've installed dependencies with `npm install`.
error:  • Check that this app was built for a compatible version of Sails.
error:  • Have a question or need help?  (http://sailsjs.com/support)
codes-Mac-mini:gitlist Kopie 2 jh$

--this mean, i have to change something in the http.js ?
Please provide a custom req, res, next middleware function for myRequestLogger,
or remove it from the order. See http://sailsjs.com/docs/concepts/middleware for more info.
how.? my is this :
/**
 * HTTP Server Settings
 * (sails.config.http)
 *
 * Configuration for the underlying HTTP server in Sails.
 * Only applies to HTTP requests (not WebSockets)
 *
 * For more information on configuration, check out:
 * http://sailsjs.org/#/documentation/reference/sails.config/sails.config.http.html
 */

module.exports.http = {

  /****************************************************************************
  *                                                                           *
  * Express middleware to use for every Sails request. To add custom          *
  * middleware to the mix, add a function to the middleware config object and *
  * add its key to the "order" array. The $custom key is reserved for         *
  * backwards-compatibility with Sails v0.9.x apps that use the               *
  * `customMiddleware` config option.                                         *
  *                                                                           *
  ****************************************************************************/

   middleware: {

  	passportInit    : require('passport').initialize(),
    passportSession : require('passport').session(),

  /***************************************************************************
  *                                                                          *
  * The order in which middleware should be run for HTTP request. (the Sails *
  * router is invoked by the "router" middleware below.)                     *
  *                                                                          *
  ***************************************************************************/

     order: [
			'startRequestTimer',
			'cookieParser',
			'session',
			'passportInit',            // <==== passport HTTP middleware should run after "session"
			'passportSession',         // <==== (see https://github.com/jaredhanson/passport#middleware)
			'myRequestLogger',
			'bodyParser',
			'handleBodyParserError',
			'compress',
			'methodOverride',
			'poweredBy',
			//   '$custom',
			'router',
			'www',
			'favicon',
			'404',
			'500'
     ],

  /****************************************************************************
  *                                                                           *
  * Example custom middleware; logs each request to the console.              *
  *                                                                           *
  ****************************************************************************/

    // myRequestLogger: function (req, res, next) {
    //     console.log("Requested :: ", req.method, req.url);
    //     return next();
    // }

  /***************************************************************************
  *                                                                          *
  * The body parser that will handle incoming multipart HTTP requests. By    *
  * default as of v0.10, Sails uses                                          *
  * [skipper](http://github.com/balderdashy/skipper). See                    *
  * http://www.senchalabs.org/connect/multipart.html for other options.      *
  *                                                                          *
  ***************************************************************************/

    // bodyParser: require('skipper')

   },

  /***************************************************************************
  *                                                                          *
  * The number of seconds to cache flat files on disk being served by        *
  * Express static middleware (by default, these files are in `.tmp/public`) *
  *                                                                          *
  * The HTTP static cache is only active in a 'production' environment,      *
  * since that's the only time Express will cache flat-files.                *
  *                                                                          *
  ***************************************************************************/

  // cache:<PHONE_NUMBER>0
};

Sails version^1.0.1:
**Node versionv8.10.0:
**NPM version6.0.0:
DB adapter name: N/A
DB adapter version: N/A
Operating system:

okey, fixed.


Manual clicks per second

Would be cool to have a "manual clicks per second" stat (would show your average clicks per second over a 1s/3s period (depending on your stats update setting).

Finally added in Version 2.5!


能否为Quill添加全屏支持

在很多场景，文本编辑组件都只能放在一个特定大小的容器里，对于编辑来说，全屏体验会更好。
因此能否对Quill进行扩展，对full screen进行支持

This component is a simple and lightweight editor. It doesn't depend on any other resources except quill core and css. Quill is an open source prototypical editor which has a powerful extension API and module registration function. If you need any other attached functions, please program on your own or use other extention modules. Finally, please don't ask the questions like whether i can realize some function in the editor or why not. Thanks.


Academic icons are not displayed

I would like to re-visit the issue #1821  as I'm having similar problem.
I have set the icon extension to true in params.toml
4269686
However, the icons from ai package (google-scholar, researchgate, orcid) don't seem to be showing yet on the website

May I know is there anything else I should change/fix?
Thank you!

Please share your repo link so the community can attempt to help you.
Most likely the issue you are experiencing is related to the setup of the site or using an older master (dev) version of Academic/Wowchemy. You may wish to consider updating to the latest master version if you are on an earlier build of the master: https://wowchemy.com/docs/update/

Its a problem with the setup

Thank you so much for the advises. I have updated the setup and it works now 😄


DO NOT fetch full list of video in the playlist (max 200 videos)

It seems that after the first time using Token extracted from HTML, the author continues to use that token while the token already changed. To fix this problem, update to use new token to get full of playlist.
In python file containing class Playlist
In function:
   def fetch_continuation(self, html):
          #same code
          return data

In function:
def __init__(self, url: str, start: int = None, end: int = None):
        # same code
        if total_count > 100:
            start_html = html
            for i in range(0, total_count//100):
                start_html = self.fetch_continuation(start_html)
            # same code

Hope this help.

Hi @hahv If you think this will solve the problem, please create a merge request. I'll review and merge the code. Thanks


CMS-591: Add ChangeLogs (notes) component to details page

Jira Ticket
CMS-591
Description

We had to add the change log notes to the details page, in the expansion panels. I turned the notes list into a component and popped it in there, and made some minor style tweaks to make it match the latest Figma styles.

...and pushed an update to rename the component so it doesn't have the same name as the prop 😅

Looks good. The only thing is that the date and name under the note should be a different colour than the note. It looks fine on the SubmitDates page and on the PreviewPage, but on the expansion panels they're both the same colour.

the date and name under the note should be a different colour than the note. It looks fine on the SubmitDates page and on the PreviewPage, but on the expansion panels they're both the same colour.

Ah, good catch. I just need to move the styles from the pages into the ChangeLogsList component 👍


Refactor toplevel.py into placer and router components

@parijatm @soneryaldiz This is ready for review.
Just split one file into three.

@kkunal1408 @soneryaldiz I don't want to check this in if it is going to mess up your pending PR #964 . What is your status on that?

@stevenmburns , I am working on reviewing that PR. I might have just found an issue on that PR.


vit freezes on startup if there is no taskrc file present

This is problematic upon first execution, if user hasn't yet created a .taskrc config file (or had it created by task), he may just conclude that vit just doesn't work and abandon altogether.
On startup, if no .taskrc file is available, task then generates one, upon user confirmation.
Would you like a sample /path/.taskrc created, so Taskwarrior can proceed? (yes/no)
Reproduce: execute TASKRC=/path/.dummytaskrc vit  (you can also instead rename old .taskrc)
Vit probably expects a non-interactive/blocking reply.
A solution could be to give user control if rc file isn't found, and react accordingly when task returns (check existence of file/return code)
Alternatively, have vit create a dummy rc file itself (with or without confirmation), but it should been best left to task.

I think probably the cleanest way to handle this is to exit VIT with a sensible error message. VIT does depend on TaskWarrior after all, so bailing if it's not properly configured seems to be a reasonable approach.
Thoughts?

I think probably the cleanest way to handle this is to exit VIT with a sensible error message. VIT does depend on TaskWarrior after all, so bailing if it's not properly configured seems to be a reasonable approach.
Thoughts?

Makes sense.
The most important is to clearly tell the user what the problem is and how to address it (i.e. by running task once to generate the config file)


Does it mean reading data align lfs->cfg->read_size ?

Maybe ,this is the correct way!

Related https://github.com/ARMmbed/littlefs/pull/102

I'm going to close this as I believe it's the correct behaviour. Feel free to reopen if you disagree.


Add support for v2 of dashboard

Hi,
we've released v2 our dashboard. The only change are the updated requirements: we now require Laravel v8 and Livewire v2.
Could you please tag a new release of your tile?
In most cases these are the things you need to do:

update the requirement in the composer.json of your tile to spatie/laravel-dashboard": "^2.0
tag a new release. Personally, I would opt for a major release, so you can still do bug fixes on the v1 of your tile.

Thanks!

The tile is updated to version 1.0.1 ( compatible dashboard v2)


SQL Server integration tests needed to reach 1.0 MVP

Got some of these done, but will add more using specific issues


Use the Luxembourgish locale of Quasar

First part of #2156
What does this PR do?
The Luxembourgish locale of Quasar is used: https://github.com/quasarframework/quasar/blob/dev/ui/lang/lu.js
I assume a test is not needed as the loading of Quasar's selected locale is not tested in general.
Checklist

[x] added a test, or explain why one is not needed/possible...
[x] no unrelated changes
[x] asked someone for a code review
[x] joined chat.foodsaving.world/channel/karrot-dev
[x] added an entry to CHANGELOG.md (description, pull request link, username(s))

Nice!
Feel free to fill in the changelog file - I usually make sure to update it when a noteworthy change happens, but below that I sometimes forget it.

@tiltec I have updated the changelog file.


Question: Combining multiple Statements

Hello
I know it is possible to combine multiple SELECT statements, but I have a use case where I could use some sort of combine Query for delete + insert.
In this specific use case, I need to delete all rows (1 + n) that match a certain ID, and then insert new rows again in one transaction.
There are alternatives like delete only what should not be there and insert only what is missing. But in a event-sourced system this can get out of hand quickly.
Right now we do this using
Query().AsDelete().Where(new { foreign_id = e.Id })

and then loop over what we have to insert and do
Query().AsInsert(new { .... })

Which results in something like
operations[0]: "delete from ... where foreign_id = ..."
operations[1]: "insert into ... values (...)"
operations[2]: "insert into ... values (...)"
operations[3]: "insert into ... values (...)"

But the system underneath which executes the individual statements cannot guarantee the order of queued individual statements.
So my idea is to queue one operation which contains the combined individual statements statements.
operations[0]: "delete from ... where foreign_id = ...; insert into ... values (...); insert into ... values (...); insert into ... values (...); insert into ... values (...);"

Is there any support or recommended way to do this?

I can always just combine the individual statements like this:
PostgresCompiler compiler = new();

Query deleteStatement = new Query(...).AsDelete().Where(new { foreign_id = e.Id })
Query insertStatement = new Query(...).AsInsert(new { .... })

SqlResult deleteResult = compiler.Compile(deleteStatement);
SqlResult insertResult = compiler.Compile(insertStatement);

string sql = deleteResult.RawSql + ";" + insertResult.RawSql;
object[] parameters = deleteResult.Bindings.Concat(insertResult.Bindings).ToArray()

But I am not sure if this is safe enough to do.