Provide a ReadonlyRegExp type

Search Terms
readonlyregexp readonly regexp
Suggestion
Provide a new ReadonlyRegExp type that represents a read only RegExp.
Use Cases
This is similar to other readonly types, e.g. ReadonlyArray -- I prefer my code to be immutable by default. I have a DeepReadonly helper that could map RegExp to ReadonlyRegExp.
Note that Readonly<RegExp> does not work:
'a'.replace(/a/ as Readonly<RegExp>, 'b')

/*
No overload matches this call.
  The last overload gave the following error.
    Argument of type 'Readonly<RegExp>' is not assignable to parameter of type 'string | RegExp'.
      Type 'Readonly<RegExp>' is missing the following properties from type 'RegExp': [Symbol.match], [Symbol.replace], [Symbol.search], [Symbol.split](2769)
*/

Examples
const emailRegExp =<EMAIL_ADDRESS>as ReadonlyRegExp;

export function suppressPII(message: string) {
    return message.replace(emailRegExp, '');
}

Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

Forgive me for asking an obvious question, but what is the intended difference between a readonly and non-readonly RegExp ?

It's a very valid question.
A normal RegExp is mutable in some situations — lastIndex can be mutated either directly, or indirectly by some calls if RegExp has y or g flag. It is actually more complicated than I thought. If it has y flag then pretty much every method will mutate it — going to be hard to model...
https://2ality.com/2020/01/regexp-lastindex.html
Potential model
RegExp.lastIndex

RegExp: writable
ReadonlyRegExp: readonly, always 0 (so we can ignore string.replace resetting it to 0)

RegExp.exec

RegExp: allowed
ReadonlyRegExp & { sticky: false; global: false }: allowed
ReadonlyRegExp & { sticky: true }|{ global: true }: not allowed

RegExp.test

RegExp: allowed
ReadonlyRegExp & { sticky: false; global: false }: allowed
ReadonlyRegExp & { sticky: true }|{ global: true }: not allowed

string.search, string.split

Always allowed

string.replace, string.match

RegExp: allowed
ReadonlyRegExp & { sticky: false; global: false; }: allowed
ReadonlyRegExp & { sticky: true; }|{ global: true }: not allowed

string.replaceAll, string.matchAll

RegExp & { global: true }: allowed
RegExp & { global: false }: not allowed (runtime TypeError as per spec)
ReadonlyRegExp & { global: true; }: allowed
ReadonlyRegExp & { global: false; }: not allowed


fix(animation): add getTimeRangeFilterKeyframes prop for export-video-panel-container

add getTimeRangeFilterKeyframes prop for export-video-panel-container to provide custom filter keyframes generation logic

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 2 (0.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.08%) to 25.984%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

modules/core/src/animations/kepler-animation.js
0
2
0.0%

Files with Coverage Reduction
New Missed Lines
%

modules/core/src/animations/kepler-animation.js
1
50.44%

Totals

Change from base Build<PHONE_NUMBER>:
0.08%

Covered Lines:
231

Relevant Lines:
776

💛  - Coveralls


EPPO: Unlink and retry when cached file is broken

This may fix your local issues @ElevnLi

I'm still having the "bad zip file" issue

Traceback?

Seems working now.


Section image cannot loaded

The image in Section could not be loaded, I tried to fix it, but I failed.
The same is true in the BookBrowser project, but calibre can load the images in the chapters normally.
I try to know why and how to fit it, but i failed.
Test'Picture OnThis :
ePubViewer can't load:::  https://github.com/conan71/pyscript/blob/master/1.jpg
Calibre can load:::: https://github.com/conan71/pyscript/blob/master/2.jpg
Calibre can load2:::: https://github.com/conan71/pyscript/blob/master/3.jpg

This is unlikely to be an ePubViewer issue. You'll probably want to open this issue on the futurepress/epub.js repository.


Hard coded Editors Evaluation with key words

Description
Clarification questions

Is the board supporting this solution?
Do we place it at the top?
Are we still calling them "Editors Evaluations"?  Or is it "Peer Review Summary" now?

What is the Problem?

What is the benefit of solving the problem?

How will we know when the problem has been solved?

How could we measure the impact or benefit of the solution?

Documents and Resources

[ ] Mockup TBC
[ ] Document 2

Tasks

[ ] Task 1
[ ] Task 2
[ ] ...

Definition of Done

[ ] Solution deployed into a production environment and accessible to users.
[ ] Solution reviewed and approved by all stakeholders.
[ ] ...

We may only need to the evaluation summary with the links, not the labels.
Stick with existing colour for the links for now.


Added sign up confirmation (#1866)

This closes #1866

this PR needs a rewrite based on a conversation between me @mohabbati

@mohabbati any news or updates?

@mohabbati plz update this PR based on our last conversation :)

@mohabbati plz resolve the conflict in the SignUp.razor file

@maryamhdr plz review this PR

@maryamhdr & @Cyrus-Sushiant
plz re-review this PR

There are still some code formatting issues remains that I leave to the other reviewers 😁
@maryamhdr & @Cyrus-Sushiant


Kafka module not supported in python 3.12

kafka-python 1.4.6 throwing error
Traceback (most recent call last):
File "/app/run.py", line 10, in
from app.routes import initialize_routes
File "/app/app/routes/init.py", line 2, in
from app.routes import AppsRoute, AppRoute, AppSettingsRoute, AppSecureSettingsRoute, NewAppRoute
File "/app/app/routes/AppsRoute.py", line 2, in
from app.components import Apps
File "/app/app/components/init.py", line 1, in
from .Apps import Apps
File "/app/app/components/Apps/init.py", line 1, in
from app.logic.Apps import AppLogic
File "/app/app/logic/Apps/init.py", line 1, in
from .AppLogic import AppLogic
File "/app/app/logic/Apps/AppLogic.py", line 3, in
from nexler.utils.error_util import handle_http_exception
File "/app/nexler/utils/error_util.py", line 2, in
from nexler.services.LoggerService import LoggerService
File "/app/nexler/services/init.py", line 7, in
from .KafkaService import KafkaService
File "/app/nexler/services/KafkaService.py", line 1, in
from kafka import KafkaConsumer, KafkaProducer, KafkaAdminClient
File "/usr/local/lib/python3.12/site-packages/kafka/init.py", line 21, in
from kafka.admin import KafkaAdminClient
File "/usr/local/lib/python3.12/site-packages/kafka/admin/init.py", line 4, in
from kafka.admin.client import KafkaAdminClient
File "/usr/local/lib/python3.12/site-packages/kafka/admin/client.py", line 10, in
from kafka.client_async import KafkaClient, selectors
File "/usr/local/lib/python3.12/site-packages/kafka/client_async.py", line 22, in
from kafka.cluster import ClusterMetadata
File "/usr/local/lib/python3.12/site-packages/kafka/cluster.py", line 12, in
from kafka.conn import collect_hosts
File "/usr/local/lib/python3.12/site-packages/kafka/conn.py", line 29, in
from kafka.protocol.admin import SaslHandShakeRequest
File "/usr/local/lib/python3.12/site-packages/kafka/protocol/init.py", line 3, in
from kafka.protocol.legacy import (
File "/usr/local/lib/python3.12/site-packages/kafka/protocol/legacy.py", line 10, in
import kafka.protocol.message
File "/usr/local/lib/python3.12/site-packages/kafka/protocol/message.py", line 6, in
from kafka.codec import (has_gzip, has_snappy, has_lz4,
File "/usr/local/lib/python3.12/site-packages/kafka/codec.py", line 9, in
from kafka.vendor.six.moves import range
ModuleNotFoundError: No module named 'kafka.vendor.six.moves'

solved with confluent_python

v1.4.4 solved the issue


Add support for SSO with Google

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Summary 💡
No response
Examples 🌈
No response
Motivation 🔦
No response

I want to try this,
but I don't sure there is whether any information I missed.

@JerryWu1234 This will likely be picked up by someone on the Toolpad team itself. There are too many details we need to solve internally on how we will implement a split in paid vs. core features.

This is now supported. Docs: https://mui.com/toolpad/studio/concepts/authentication/#google


🎨 Adding trivy workflow file

Some things are missing:

[ ]  Quick mention/doc on the readme with a simple example
[ ]  Add a simple test

And lastly, this is something where I'll let you pick, do you want to add as input of your workflow more trivy options? Or do you consider that if more options are needed, the user should use the action directly instead?

On which README, that of the project scality/workflows ?
What does "Add a simple test" ? Like doing a build.yaml file in the repo scality/workflows and calling the trivy.yaml file ?

And lastly, this is something where I'll let you pick, do you want to add as input of your workflow more trivy options? Or do you consider that if more options are needed, the user should use the action directly instead?

I did not responded to this. I think for now, the easier it is, the better it is. Otherwise, people won't use Trivy. So I think we can let it like that for now - And for those who really want specific options, they can create their own Trivy workflow based on ours. Ok for you ?


A small issue when using your code

Hello, I really admire your work. However, I encountered a small issue when using your code. In the following code, the line "x1 + temporal_pos_embed[:, None, :]" seems to be incorrect because the shape of x1 is ((T, NHW, C)), while the shape of "temporal_pos_embed[:, None, :]" is (T, 1, C). Moreover, the T dimension of the two tensors is different, so they cannot be directly added. Have you encountered this problem before? Is it possible that the issue is with my data? I would greatly appreciate it if you could spare some time to clarify my doubts. This code is located in the forward method of the class VidHRFormerBlockEnc(nn.Module).
def forward(self, x, local_window_pos_embed, temporal_pos_embed):
"""
x: (N, T, H, W, C)
local_window_pos_embed: (window_size, window_size, C)
temporal_pos_embed: (T, C)
Return: (N, T, H, W, C)
"""
print(x.shape)
print(temporal_pos_embed.shape)
N, T, H, W, C = x.shape
x = x + self.drop_path(self.SLMHSA(self.norm1(x), local_window_pos_embed)) #spatial local window self-attention, and skip connection
    #Conv feed-forward, different local window information interacts
    x = x + self.drop_path(self.SpatialFFN(self.norm2(x)))#(N, T, H, W, C)

    #temporal attention
    x = x.permute(1, 0, 2, 3, 4).reshape(T, N*H*W, C)
    x1 = self.norm3(x)
    if self.far:
        #create attention mask for temporal self-attention
        attn_mask = torch.triu(torch.ones(T, T), diagonal = 1) == 1
        x = x + self.drop1(self.temporal_MHSA(x1 + temporal_pos_embed[:, None, :],
                           x1 + temporal_pos_embed[:, None, :],
                           x1,
                           attn_mask = attn_mask.to(x1.device))[0])

Thanks for your reply!


Add [BlueChiptoken bluechiptoken.keybase.pub] #issuer GC7RDI…ACGGZR

Address: GC7RDICBBP2FO75MQBCMJIACRDHOZDJPLES2KRSJEAQMLGZVXWACGGZR
Tags: issuer
Title: BlueChiptoken  Domain: bluechiptoken.keybase.pub
Requested by @kareem247

BlueChiptoken mutates the profits reliability and value attributes of blue-chip stocks into cryptocurrency.

@Kareem247 can you please explain what you would like stellar.expert to do concerning this new and very small token project? The project domain is a missing website on Keybase and their blog doesn't have much information other than giving them your email to ask questions.
I would greatly caution you since they do not give any real contact or organizational information about their project or it's team.

@Kareem247 can you please explain what you would like stellar.expert to do concerning this new and very small token project? The project domain is a missing website on Keybase and their blog doesn't have much information other than giving them your email to ask questions.
I would greatly caution you since they do not give any real contact or organizational information about their project or it's team.

The project bluechiptoken is community powered, a fairly simple concept to tokenzie and mutate blue-chip stocks into the cryptocurrency market to be distributed among crypto communities. It is not owned by any organisation, the idea was zero cost and organic adoption so the stellar.toml file is hosted on keybase (a public domain for encryption) parsed to client as (bluechiptoken.keybase.pub/.well-known/stellar.toml)

@Kareem247  do you have some kind of audit to verify the tokenized stocks and the holdings of the said stocks. I'm not really sure what you meaning by "mutate" blue-chip stocks. You website for the domain does not have any information. Or is this just a pretend virtual game?

@CryptoHobbyist well I agree if you may refer to it as virtual game, but BlueChiptoken is never gonna be a pretence. Perhaps all meme project break into market with virtual concept ruggedly marketed to the public (pump and dump). But BlueChiptoken is here to change the narrative, it's gonna exist just like Bitcoin among meme tokens. I believe you understand it now, hopefully you would support the idea and grant Issuer address on safe list. Thanks and best regards

@Kareem247 There is no special safe list. We only tag and warn people about tokens and wallets that are a part of a fraud such as false claims of assets, associations, counterfeits, infringement of brands, trademarks, or logos.


fix(create-svelte): bump minimum required Svelte version

The Vite Svelte plugin uses the cssHash option which was added in 3.34
For some reason I can't build the templates locally, it says
import { transform } from 'sucrase';
         ^^^^^^^^^
SyntaxError: The requested module 'sucrase' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export.

So I hope I got the right place where to bump the version

What version of Node are you on when you're trying to build this locally? I think later versions got better at CJS/ESM interop in areas like this. See also the comment https://github.com/sveltejs/kit/pull/1000#issuecomment-819051317 on that closed PR.


nixos/activation: fix activation script for non-POSIX shells (retry)

Motivation for this change
This fixes an issue with shells like fish that are not fully POSIX
compliant. The syntax `ENV=val cmd' doesn't work properly in there.
This issue has been addressed in #45932 and #45945, however it has been
recommended to use a single shell (stdenv.shell' which is either bash' or `sh') to significantly reduce the maintenance overload in the
future.
See https://github.com/NixOS/nixpkgs/issues/45897#issuecomment-417923464
Fixes #45897
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

backport to 18.09: a015527b1b2

backported to 18.09: 4c4aff32


Move fcrepo and fcrepo related microservices to separate docker-compose.yml

Move fcrepo and fcrepo related microservices to separate docker-compose.yml includes

gemini
recast
milliner
blazegraph

This allows people to not have to use it when setting up for the first time. Please note the fcrepo & gemini dbs will still be created if only using Drupal.

Closing this ticket as this work has been completed. All services using separate docker-compose files and Docker-compose extends functionality.

Oh and nice work there @nigelgbanks and @dannylamb . Thanks! :)


Don't Merge! Regression PR perf testing with metadata validation

Docs Build status updates of commit 5df876a:
:clock10: Full build: the average full build time is 24 min(s) 23 sec(s), this is based on the last 98 build(s) for this repository.

Docs Build status updates of commit 5df876a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

TestingPullRequest.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit 5df876a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

TestingPullRequest.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Fixes GIC Jira task DD-19 "Initial population out".

This implementation is under discussion.  The PR is not ready.  Closing for now.  Will need to open a new one once the issue is resolved.


Enable strictNullChecks

This avoids a few bugs when things were incorrectly assumed to be
null or non-null.

I think I replied to all comments, feel free to have a look again

Also see https://travis-ci.com/github/PowerKiKi/ngx-avatar/builds/160987210

would you prefer to squash all commits before merging ?


not found: "metals/findTextInDependencyJars" request handler for client "GitHub Copilot".

Describe the bug
When executing :MetalsFindInDependencyJars on the command-line with the GitHub Copilot plugin installed with the following input:
Filemask: .conf
Query: String

I then run into the following error:
Error executing Lua callback: ...l/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1382: not found: "metals/findTextInDependencyJars" request handler for client "GitHub Copilot".
stack traceback:
        [C]: in function 'assert'
        ...l/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1382: in function 'request'
        ...l/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1969: in function 'fn'
        ...l/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:184: in function 'for_each_buffer_client'
        ...l/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1968: in function 'buf_request'
        ...lt.ext/.local/share/nvim/lazy/nvim-metals/lua/metals.lua:281: in function 'send_request'
        ...lt.ext/.local/share/nvim/lazy/nvim-metals/lua/metals.lua:292: in function 'on_confirm'
        ...al/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/ui.lua:103: in function 'input'
        ...lt.ext/.local/share/nvim/lazy/nvim-metals/lua/metals.lua:288: in function 'get_query_and_send'
        ...lt.ext/.local/share/nvim/lazy/nvim-metals/lua/metals.lua:302: in function 'on_confirm'
        ...al/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/ui.lua:103: in function 'input'
        ...lt.ext/.local/share/nvim/lazy/nvim-metals/lua/metals.lua:297: in function <...lt.ext/.local/share/nvim/lazy/nvim-metals/lua/metals.lua:276>
        .../.local/share/nvim/lazy/nvim-metals/lua/metals/setup.lua:46: in function <.../.local/share/nvim/lazy/nvim-metals/lua/metals/setup.lua:45>

Why is GitHub Copilot affected by a command for Metals? Any idea what could be going on here?
Expected behavior
I would expect to see the results when searching for text in dependency jars.
Operating system
macOS
Version of Metals
v1.2.2
Commit of nvim-metals
4f9bf0c821092f20dd34c1a4ea5b07b0500ff089

Just to confirm, if you don't have copilot enabled or installed you don't have this problem? Just testing the command locally for me works fine, so you'll have to try and minimally reproduce. I have no idea why having copilot would impact this at all.

Correct, if I disable Copilot I don't run into any issue and I see the results in the Quickfix window.

I will need to try and reproduce this. I think what is happening is that we're just grabbing the current client and sending the request to it. Normally in Scala here this would always just be Metals, but it seems that the client this is being sent to is copilot... and of course the custom metals endpoint doesn't exist there.

That would be great, thanks!
This is my Lazy config for Copilot :
  {
    "github/copilot.vim"
  },

Using the latest version:
  "copilot.vim": { "branch": "release", "commit": "1e135c5303bc60598f6314a2276f31dc91aa34dd" },

Finally got around to fixing this in https://github.com/scalameta/nvim-metals/pull/697. Give it a try and let me know if you still have issues with this.


Older command line arguments failing in wasm-ld

While building CPython with wasi-sdk-21 I got the following error.
/opt/wasi-sdk/bin/wasm-ld   -z stack-size=524288 -Wl,--stack-first -Wl,--initial-memory=10485760   Modules/_testimportmultiple.o   -o Modules/_testimportmultiple.cpython-313d-wasm32-wasi.so
wasm-ld: error: unknown argument: -Wl,--stack-first
wasm-ld: error: unknown argument: -Wl,--initial-memory=10485760
make: *** [Makefile:3183: Modules/_testimportmultiple.cpython-313d-wasm32-wasi.so] Error 1

Can you please tell me what are the new/expected arguments to wasm-ld for this?

If you are invoking the linker directly you don't prefix the linker args with -Wl,.  That prefix is what the compiler driver (clang) uses to distinguish linker argument.

If you are invoking the linker directly you don't prefix the linker args with -Wl,. That prefix is what the compiler driver (clang) uses to distinguish linker argument.

This comes from CPython's configure.ac and has worked until now (e.g. WASI SDK 20 is fine with this). So we're trying to figure out who/what changed.

I found the issue on our side. We had not seen it before because dlopen() never existed before. 😅

Closing the issue.


Add license headers to files that were missing them.

archaius-pull-requests #179 SUCCESS
This pull request looks good

NetflixOSS » archaius » archaius-pull-requests #11 SUCCESS
This pull request looks good


[Linux] Mouse jumping to spawn sphere in world editor

Hi!
I currently have this weird issue where my cursor will kind of jump to where ever my player is located at the moment if I hold down my left mouse button and move it.
This creates these weird huge towers:
http://i.imgur.com/drlUeUw.png
The pink circle also kind of hangs every few seconds if I just move my mouse over terrain without doing anything, which is very weird since I'm getting well over 100 FPS in the editor. When it does this, one of my CPU cores goes to 100% and GPU usage drops to 0%. I have absolutely no idea what's causing this.
My system for reference:
http://i.imgur.com/cth8vn0.png
It's kind of usable if you do it slowly, but obviously this is game-breaking, so to speak.
Any help would be appreciated, thanks.
Edit:
Probably should have mentioned that I'm using the 3.8 precompiled binaries.

This is the first time I've heard of the engine working on Arch that I can remember, so that's good haha. Have you compiled from source ever, and if so, were the issues resolved?

If I clone this repo and then try to create a new project according to the wiki, make exits with this error:
[ 42%] Linking C static library libzlib.a
[ 42%] Built target zlib
Scanning dependencies of target game
[ 42%] Building CXX object Tools/CMake/CMakeFiles/game.dir/__/__/Engine/source/app/banList.cpp.o
In file included from /HDD1/game/Torque3D/Engine/source/console/simObject.h:30:0,
                 from /HDD1/game/Torque3D/Engine/source/console/engineAPI.h:39,
                 from /HDD1/game/Torque3D/Engine/source/app/banList.h:27,
                 from /HDD1/game/Torque3D/Engine/source/app/banList.cpp:23:
/HDD1/game/Torque3D/Engine/source/console/consoleObject.h:51:32: fatal error: tinyXML/tinyxml.h: No such file or directory
compilation terminated.
Tools/CMake/CMakeFiles/game.dir/build.make:62: recipe for target 'Tools/CMake/CMakeFiles/game.dir/__/__/Engine/source/app/banList.cpp.o' failed
make[2]: *** [Tools/CMake/CMakeFiles/game.dir/__/__/Engine/source/app/banList.cpp.o] Error 1
CMakeFiles/Makefile2:206: recipe for target 'Tools/CMake/CMakeFiles/game.dir/all' failed
make[1]: *** [Tools/CMake/CMakeFiles/game.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Interesting. Looks like a case-sensitivity error... why haven't we picked that up on any other Linux yet? Unless it's crept in since 3.8. @Areloch anything introduced in TAM changes?


feat: resolve external modules with an 'external!' prefix

🚧 WIP

Current coverage is 22.41% (diff: 12.50%)

Merging #36 into master will decrease coverage by 77.58%

@@           master        #36   diff @@
========================================
  Files           7          7
  Lines          43         58    +15
  Methods        13         15     +2
  Messages        0          0
  Branches        9         12     +3
========================================
- Hits           43         13    -30
- Misses          0         45    +45
  Partials        0          0

Powered by Codecov. Last update f522a51...14392cb


Operator removes self-hosted cluster right after creation

Hi,
I am trying to setup a self-hosted Kubernetes cluster with bootkube which uses the etcd-operator to create a self-hosted etcd.
In my case I am getting the following error during creation. The operator removes the etcd cluster right after migration (as it seems).
I am running the operator version v0.4.2 (bootkube only supports TPRs at the moment).
time="2017-08-23T09:33:32Z" level=info msg="migrating boot member (https://<IP_ADDRESS>:12379)" cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:37Z" level=info msg="beginning the process of removing boot member (https://<IP_ADDRESS>:12379) from the cluster" cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:37Z" level=info msg="self-hosted cluster created with boot member (https://<IP_ADDRESS>:12379)" cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:37Z" level=info msg="waiting 1m0s before removing the boot member" cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:37Z" level=info msg="start running..." cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:45Z" level=error msg="failed to update members: get member name failed: member (boot-etcd) does not belong to this cluster" cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:45Z" level=error msg="cluster failed: get member name failed: member (boot-etcd) does not belong to this cluster" cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:45Z" level=warning msg="fail to handle event: ignore failed cluster (kube-etcd). Please delete its TPR" pkg=controller
time="2017-08-23T09:33:45Z" level=info msg="deleting the failed cluster" cluster-name=kube-etcd pkg=cluster
time="2017-08-23T09:33:45Z" level=info msg="deleted pod (kube-etcd-0000)" pkg=gc
time="2017-08-23T09:33:45Z" level=info msg="deleted service (kube-etcd)" pkg=gc
time="2017-08-23T09:33:45Z" level=info msg="deleted service (kube-etcd-client)" pkg=gc
time="2017-08-23T09:34:42Z" level=error msg="boot member migration: failed to remove the boot member (grpc: timed out when dialing)" cluster-name=kube-etcd pkg=cluster

Any ideas what I am doing wrong here?
Regards,
Andreas

Can you reproduce it in pure etcd-operator?
Or can you reproduce it using bootkube? If so, please report it to bootkube repo and write down repro steps.

We can close this issue. I provided the wrong service IP address in the etcd manifest file.


https://exabl.github.io/snek5000 is broken

We don't use this so much but it is mentioned on Github and it's broken:
https://exabl.github.io/snek5000

It is fixed now.


Update for FreeBSD 13.2

Release 13.2 is out
https://www.freebsd.org/releases/13.2R/relnotes/
Need to update ISO URL, checksums, some variables, and test before updating live system.

This is done, all updated
https://github.com/depenguin-me/depenguin-builder/pull/13


Error in the code of an example.

In the portion of code of the C class, there is a little problem. However, it is not related to the topic of the page.
The class is public while the init accessor is protected.

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

ID: 491550b6-23f8-a48a-c6e5-f177151030ff
Version Independent ID: 4037b376-e4f6-73cc-3dd1-abea0fc7db5b
Content: Required members - C# 11.0 draft specifications
Content Source: proposals/csharp-11.0/required-members.md
Product: dotnet-csharp
Technology: csharp-spec
GitHub Login: @dotnet-bot
Microsoft Alias: wiwagn

tagging @333fred
I believe that declaration is correct and intentional. The example for C shows what conditions cause the compiler to generate warnings.

That is correct, it is intentionally bad code, demonstrating what will cause an error.

Thanks
I'll close as by-design.


Could you drop conda?

Annaconda has shifted to a paid licence. And therefore we must not use that any more (University).
Is there a way to install this without the conda part?

@stela2502 thank you for asking about this. We can not remove the use of conda and the Anaconda channels as this is an integral part of our approach on how to build Numba and hence used in the numba-hatchery.
However, if you are in an academic setting, you should be ok. The Anaconda FAQ about pricing at:
https://www.anaconda.com/pricing/terms-of-service-faqs
states that:
The distribution of packages Anaconda builds and maintains remains free for individuals and small organizations, which is defined in the Terms of Service as having less than 200 employees or contractors.


Fingerless gloves in SecDrobe

About the PR

Just adds fingerless gloves to the secdrobe, under the black gloves
Why / Balance

Increased security drip, black gloves are drippy enough but fingerless gloves can be drippy in the correct circumstances
Media

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog
:cl: JoeHammad

add: Fingerless gloves are now available in the SecDrobe

drip acquired


Add section on how to set MTU for perf testing on AWS

There is ongoing design and testing of MTU with AWS.  We are working towards a solution which may or may not involve this document.

LGTM


Missing documentation section on execute()

execute and execute__and_fetch are not in the docs: https://github.com/memgraph/gqlalchemy/blob/main/gqlalchemy/connection.py#L48
We should document this.

This was updated with the last release (reference guide regenerated)


How to set up Referrer? I set it or returned 403. But I can download it with native curl_setopt.

How to set up Referrer? I set it or returned 403. But I can download it with native curl_setopt.

@burncode can you provide more details please? i can't see why it wouldn't work

@JacerOmri I need to download things through the remote interface, but the interface needs to verify Referer and authentication, need to customize the Referer and add header information. Can you provide an example?I tried many times, but I couldn't.  Thank you


Increase coverage

Codecov Report

Merging #13 (e9aa7e5) into master (f20ee5f) will decrease coverage by 10.89%.
The diff coverage is 68.18%.

@@             Coverage Diff             @@
##           master      #13       +/-   ##
===========================================
- Coverage   61.57%   50.68%   -10.90%
===========================================
  Files           9        8        -1
  Lines         380      292       -88
  Branches       58       48       -10
===========================================
- Hits          234      148       -86
  Misses        127      127
+ Partials       19       17        -2

Flag
Coverage Δ

ansible-devel
?

ansible-devel-py3.10
?

ansible-devel-py3.8
?

ansible-stable-2.10
50.68% <68.18%> (-10.06%)
:arrow_down:

ansible-stable-2.10-py2.7
49.31% <68.18%> (+3.28%)
:arrow_up:

ansible-stable-2.10-py3.5
49.65% <68.18%> (+3.21%)
:arrow_up:

ansible-stable-2.10-py3.9
50.68% <68.18%> (+3.82%)
:arrow_up:

ansible-stable-2.11
?

ansible-stable-2.11-py2.7
?

ansible-stable-2.11-py3.5
?

ansible-stable-2.11-py3.9
?

ansible-stable-2.12
?

ansible-stable-2.12-py3.10
?

ansible-stable-2.12-py3.8
?

integrationtests
50.68% <68.18%> (+1.31%)
:arrow_up:

sanitytests
?

unittests
?

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

Impacted Files
Coverage Δ

plugins/lookup/__init__.py
64.28% <54.54%> (+11.78%)
:arrow_up:

tests/mocks/lookup_plugins/simple_lookup.py
81.81% <81.81%> (ø)

plugins/plugin_utils/args_validation.py
54.05% <0.00%> (-21.63%)
:arrow_down:

plugins/plugin_utils/path.py
31.03% <0.00%> (-20.69%)
:arrow_down:

plugins/action/__init__.py
45.96% <0.00%> (-7.26%)
:arrow_down:

tests/unit/plugins/action/test_actionBase.py

plugins/plugin_utils/cli_parser.py

Continue to review full report at Codecov.

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


I have some params in llama.cpp but i cant see in this repo

Is your feature request related to a problem? Please describe.
-interactive-first -i -ins
-ngl
this  -interactive-first will give a context to the ai, and i want that ,and -ngl is the gpu accelerator ,can this be found in this repo

Same problem here, when using llama-cpp from terminal and using -ins the answer I get are much more useful that the ones I get using python and I think it's because python use by default the interactive mode.


Fix bazel build with rules_go v0.25.0

Currently on master with Bazel 3.7.1:
make bazel
# generate the PGV plugin with Bazel
bazel build //tests/...
INFO: Analyzed 47 targets (129 packages loaded, 8638 targets configured).
INFO: Found 47 targets...
INFO: From Generating into bazel-out/darwin-fastbuild/bin/tests/harness/cases/go_/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
INFO: From ProtoGenValidatePythonGenerate tests/harness/cases/bool_pb2.py:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
INFO: From Generating into bazel-out/darwin-fastbuild/bin/tests/harness/cases/go_/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
INFO: From Generating bazel-out/darwin-fastbuild/bin/tests/harness/cases/cases_proto-validate-gensrc.jar:
tests/harness/cases/filename-with-dash.proto:6:1: warning: Import validate/validate.proto is unused.
INFO: From ProtoGenValidateCcGenerate tests/harness/cases/bool.pb.validate.h:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
INFO: From GoLink tests/harness/go/main/main_/main:
link: warning: package "github.com/golang/protobuf/ptypes/any" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/any:go_default_library
    @io_bazel_rules_go//proto/wkt:any_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
link: warning: package "github.com/golang/protobuf/ptypes/duration" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/duration:go_default_library
    @io_bazel_rules_go//proto/wkt:duration_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
link: warning: package "github.com/golang/protobuf/ptypes/timestamp" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/timestamp:go_default_library
    @io_bazel_rules_go//proto/wkt:timestamp_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
link: warning: package "github.com/golang/protobuf/ptypes/wrappers" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/wrappers:go_default_library
    @io_bazel_rules_go//proto/wkt:wrappers_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
INFO: From GoLink tests/harness/executor/executor_/executor:
link: warning: package "github.com/golang/protobuf/ptypes/any" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/any:go_default_library
    @io_bazel_rules_go//proto/wkt:any_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
link: warning: package "github.com/golang/protobuf/ptypes/duration" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/duration:go_default_library
    @io_bazel_rules_go//proto/wkt:duration_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
link: warning: package "github.com/golang/protobuf/ptypes/timestamp" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/timestamp:go_default_library
    @io_bazel_rules_go//proto/wkt:timestamp_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
link: warning: package "github.com/golang/protobuf/ptypes/wrappers" is provided by more than one rule:
    @com_github_golang_protobuf//ptypes/wrappers:go_default_library
    @io_bazel_rules_go//proto/wkt:wrappers_go_proto
Set "importmap" to different paths in each library.
This will be an error in the future.
INFO: Elapsed time: 48.916s, Critical Path: 13.62s
INFO: 264 processes: 5 internal, 258 darwin-sandbox, 1 worker.
INFO: Build completed successfully, 264 total actions

With rules_go v0.25.0 those warnings are errors:
make bazel
# generate the PGV plugin with Bazel
bazel build //tests/...
INFO: SHA256 (https://golang.org/dl/?mode=json&include=all) = 0e17da285d7dafb0539123f5c043981823f2a618cc7fb26390c21c1eb2e29794
INFO: Analyzed 49 targets (107 packages loaded, 7959 targets configured).
INFO: Found 49 targets...
INFO: From Generating into bazel-out/darwin-fastbuild/bin/tests/harness/cases/go_/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
INFO: From ProtoGenValidatePythonGenerate tests/harness/cases/bool_pb2.py:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
INFO: From Generating bazel-out/darwin-fastbuild/bin/tests/harness/cases/cases_proto-validate-gensrc.jar:
tests/harness/cases/filename-with-dash.proto:6:1: warning: Import validate/validate.proto is unused.
INFO: From ProtoGenValidateCcGenerate tests/harness/cases/bool.pb.validate.h:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
INFO: From Generating into bazel-out/darwin-fastbuild/bin/tests/harness/cases/go_/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go:
tests/harness/cases/filename-with-dash.proto: warning: Import validate/validate.proto is unused.
ERROR: /Users/mikhail/src/protoc-gen-validate/tests/harness/go/main/BUILD:33:10: GoLink tests/harness/go/main/main_/main failed (Exit 1): builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder link -sdk external/go_sdk -installsuffix darwin_amd64 -arc ... (remaining 139 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox builder failed: error executing command bazel-out/host/bin/external/go_sdk/builder link -sdk external/go_sdk -installsuffix darwin_amd64 -arc ... (remaining 139 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
link: package conflict error: github.com/golang/protobuf/ptypes/any: multiple copies of package passed to linker:
        @io_bazel_rules_go//proto/wkt:any_go_proto
        @com_github_golang_protobuf//ptypes/any:any
Set "importmap" to different paths or use 'bazel cquery' to ensure only one
package with this path is linked.
INFO: Elapsed time: 37.869s, Critical Path: 12.24s
INFO: 278 processes: 3 internal, 274 darwin-sandbox, 1 worker.
FAILED: Build did NOT complete successfully
make: *** [bazel] Error 1

Because of the above I cannot use this project in my build anymore. So here is a fix.

Though this has been merged it has not been released yet. Any plans to release a version with at least this PR soon? Thank you


debugger activation is no longer debug type specific

extracted from #33803.
Previously debuggers would activate on the onDebug:type activation event which only fires if this type of debugging is really needed (e.g. because the user runs a launch config that refers to this debug type). So, a Java debug extension would not activate if the user only works in (and debugs) a Python project.
With the new debug API it has become necessary that debug extensions are activated as soon as any debugging functionality is triggered so that they can register their "DebugConfigurationProvider" for a specific debug type. For this we have introduced a onDebug activation event.
A consequence of this is that all debug extensions are activated as soon as a launch configuration is started (independent of type). As long as activation of a debug extension is cheap this is not a problem. However, there are some debug extensions where activation triggers a language server to start up which makes the original debug operation (that triggered the activation) behave sluggish.
We should find a way to mitigate this.

My suggestion from the other issue: introduce new activation event "onDebugSession:type" which would fire everytime a session of that type is about to start. Basically would behave like the old event.

We've introduced the new event for a reason. Reintroducing the old event does not address the problem we tried to solve:
Activating on a specific type only would miss the case of collecting all registered DebugConfigurationProviders for the "initialLaunchConfigs" functionality.

That would be an improvement. onDebugInitialConfigurations could still activate the go language server unnecessarily, but that shouldn't happen too often. And it would register for onDebugResolve:go, which is a good time for it to activate. So it seems good to me.
Having 3 similar events could be confusing though. What if we just had onDebug:type which was equivalent to onDebugInitialConfigurations | onDebugResolve:type? I guess this is the same as activating the old event for onDebugInitialConfigurations.

Having only onDebug:type with the semantics onDebugInitialConfigurations | onDebugResolve:type would work too, but it would mean that extensions are activated in the "initial launch configurations" case even if they do not provide any launch configs. However, that is not worse than the current solution.

even if they do not provide any launch configs

My guess is that most extensions that have a debug config provider would provide initial configs. But I don't know for sure, maybe vscode-tools could answer that question.

Most debug extensions contribute initial launch configs statically and declaratively through the package.json. In this case the DebugConfigurationProvider.provideDebugConfigurations isn't used and we could avoid the activation.

I have pushed new activation events onDebugInitialConfigurations and onDebugResolve:type as @weinand specified above.
We should remember to mention this in the release notes and to update our documentation about activation events. I plan to do that end of next week.

I'v started to use both activation events for node-debug (instead of onDebug).
Please consider this for the test plan item.

@weinand great!
I created a test plan item https://github.com/Microsoft/vscode/issues/39535


UI Issue in path editor while using Publisher Portal

Description
This is for reporting the path editor issue while using publisher portal
Steps to Reproduce

Go to Endpoints -> Prototype Implementation
Remove the content of a resource1 and add new content to it
Copy new content
Expand the resource2
Select all(CTR + A) the existing content of that resource2 and paste the copied content
After that we have observed that Automatically resource1 content getting changed

Affected Component
APIM
Version
<IP_ADDRESS>
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response

Fixed by https://github.com/wso2/apim-apps/pull/464


Addition of @assistant.on("function_calls_started")

Would it be possible to add something like:
@assistant.on("function_calls_started")
We currently have @assistant.on("function_calls_finished")... But some of the functions which I'm calling take a couple of seconds to respond with data.
It would be great to be able to tap into a "starting" state, where I could then:
await assistant.say("Hmmm, let me just look that up for you - Give me 2 seconds.")

Any advice or input would be greatly appreciated

8fbc1f3b5aa6c11d7fa90a8f2a580d026ec90055.sqlite-shm 3

Hey, can function_calls_collected satisfy your needs?

you could just instruct the llm to always return a spoken response along with the function call. this works the majority of the time for me but I've found there are also times when it ignores this instruction despite strong prompting.
or you could include a chat completion request in the body of the function call itself? particularly if some of your function calls require this "hold on" dialogue and some don't.

I don't know if this helps you, but it helped me! This is the way I receive events from the agent server and send it via publish_data to the client app side.
`import asyncio
import logging
from livekit import rtc
from livekit.agents import JobContext, JobRequest, WorkerOptions, cli
from livekit.agents.llm import ChatContext, ChatMessage, ChatRole
from livekit.agents.voice_assistant import VoiceAssistant
from livekit.plugins import deepgram, openai, silero, elevenlabs
from dataclasses import dataclass
@dataclass
class VoiceSettings:
stability: float  # [0.0 - 1.0]
similarity_boost: float  # [0.0 - 1.0]
style: float | None = None  # [0.0 - 1.0]
use_speaker_boost: bool | None = False
@dataclass
class Voice:
id: str
name: str
category: str
settings: VoiceSettings | None = None
async def broadcast_event(local_participant, event_name, data):
# Encode the event data into a format suitable for transmission
payload = f"{event_name}:{data}".encode('utf-8')
try:
    await local_participant.publish_data(
        payload=payload,
        kind=rtc.DataPacketKind.KIND_RELIABLE,  # Reliable transmission
        destination_sids=[],  # Broadcast to all participants
        topic="speaking_state"
    )
    logging.info(f"Broadcasted event '{event_name}' with data: {data}")
except Exception as e:
    logging.error(f"Failed to broadcast event '{event_name}': {str(e)}")

def user_started_speaking(assistant, local_participant):
asyncio.create_task(broadcast_event(local_participant, 'user_started_speaking', 'true'))
logging.info(f"Event data: user_started_speaking")
def user_stopped_speaking(assistant, local_participant):
asyncio.create_task(broadcast_event(local_participant, 'user_stopped_speaking', 'false'))
logging.info(f"Event data: user_stopped_speaking")
def agent_started_speaking(assistant, local_participant):
asyncio.create_task(broadcast_event(local_participant, 'agent_started_speaking', 'true'))
logging.info(f"Event data: agent_started_speaking")
def agent_stopped_speaking(assistant, local_participant):
asyncio.create_task(broadcast_event(local_participant, 'agent_stopped_speaking', 'false'))
logging.info(f"Event data: agent_stopped_speaking")
def stop_speaking(assistant: VoiceAssistant):
"""Handle the stop_speaking event to immediately stop the voice assistant from speaking"""
logging.info("stop_speaking event triggered")
if assistant._playing_speech:
logging.info("Assistant is currently speaking, attempting to stop...")
assistant._playing_speech.interrupted = True
if assistant._play_task:
asyncio.create_task(assistant._play_task.cancel())  # Stop the TTS task immediately
logging.info("Assistant successfully stopped speaking.")
else:
logging.info("No active speech to stop.")
#asyncio.create_task(broadcast_event(local_participant, 'stop_speaking', 'true'))

async def handle_data_received(dp: rtc.DataPacket, assistant: VoiceAssistant):
try:
# Decode the data from the DataPacket
message = dp.data.decode('utf-8')
logging.info(f"Received message on topic '{dp.topic}': {message}")
    # Check if it's the stop_speaking message
    if message == "stop_speaking:true" and dp.topic == "speaking_state":
        logging.info("Triggering stop_speaking event")
        # Emit the stop_speaking event
        assistant.emit('stop_speaking')

except Exception as e:
    logging.info(f"Error handling data received: {str(e)}")

async def entrypoint(ctx: JobContext):
try:
initial_ctx = ChatContext(
messages=[
ChatMessage(
role=ChatRole.SYSTEM,
text="Voice Agent.",
)
],
)
    VOICE1 = Voice(
        id="",
        name="",
        category="custom",
        settings=VoiceSettings(
            stability=0.53, similarity_boost=0.71, style=0, use_speaker_boost=True
        ),
    )

    initPrompt = "How can I help you"

    assistant = VoiceAssistant(
        vad=silero.VAD(),
        stt=deepgram.STT(language="de-DE"),
        llm=openai.LLM(model="gpt-4o"),
        tts=elevenlabs.TTS(voice=VOICE1, language="de"),
        chat_ctx=initial_ctx,
        allow_interruptions=True,
        interrupt_volume=0.20,
        interrupt_speech_duration=0.65,
        interrupt_min_words=1,
        base_volume=1.0,
        transcription_speed=1.83,
    )

    # Start the assistant
    assistant.start(ctx.room)

    # Event handlers
    assistant.on('user_started_speaking', lambda: user_started_speaking(assistant, ctx.room.local_participant))
    assistant.on('user_stopped_speaking', lambda: user_stopped_speaking(assistant, ctx.room.local_participant))
    assistant.on('agent_started_speaking', lambda: agent_started_speaking(assistant, ctx.room.local_participant))
    assistant.on('agent_stopped_speaking', lambda: agent_stopped_speaking(assistant, ctx.room.local_participant))
    assistant.on('agent_speech_interrupted', lambda: agent_stopped_speaking(assistant, ctx.room.local_participant))

    # Register data received handler
    ctx.room.on("data_received", lambda dp: asyncio.create_task(handle_data_received(dp, assistant)))

    # Register the stop_speaking event handler
    assistant.on('stop_speaking', lambda: stop_speaking(assistant))

    await asyncio.sleep(1)
    await assistant.say(initPrompt, allow_interruptions=True)
except Exception as e:
    logging.error(f"Error in entrypoint: {str(e)}")

async def request_fnc(req: JobRequest) -> None:
logging.info("received request %s", req)
await req.accept(entrypoint)
if name == "main":
cli.run_app(WorkerOptions(request_fnc))
`

Would it be possible to add something like: @assistant.on("function_calls_started")
We currently have @assistant.on("function_calls_finished")... But some of the functions which I'm calling take a couple of seconds to respond with data.
It would be great to be able to tap into a "starting" state, where I could then:
await assistant.say("Hmmm, let me just look that up for you - Give me 2 seconds.")

Any advice or input would be greatly appreciated

I met the same scenario, have you solve it? any suggestions would be great. @birksy89

Thanks @birksy89
I solve it by using LLM prompt and let LLM attach a text content along with function call. It is supported in the newest version of livekit-agents.
I hope it helps you too.

@zamia can you provide a snippet for example?
Does the LLM return the text before the function call is finished?

the response text is along side with the function call, they are in the same response. like this( this log is from claude-3.5-sonnet)
{'role': 'user', 'content': [{'text': 'Tell me the weather of Los Angeles.', 'type': 'text'}]},
{'role': 'assistant', 'content': [{'text': ' Sure thing! Let me check that for you. Hmm, just a moment please.', 'type': 'text'}, {'id': 'toolu_01Av6PofMJz1foNH8fyYe6bY', 'type': 'tool_use', 'name': 'get_weather', 'input': {'location': 'Los Angeles'}}]}

the system prompt is like this:
......some system prompt here....
Create a response that includes an interjection before calling the function to simulate processing time while the backend queries the API. The response along with the function call should be like 'ok, let me check on that, wait a moment please.'. Remember this response is along with the function call."

I also found gpt-4o-mini does not work properly, but gpt-4o and claude-3.5-sonnet works fine.

@zamia thanks for the reply.
Yeah, this is what I ended up doing originally - But the response came always just before the function call.
So there was a gap, (while the function was processed) and then the "let me check" + function call response came together shortly after.
It was probably the model which was being used. I was trying these things very early in the release.
I personally still think there's a plan for the originally proposed:
@assistant.on("function_calls_started")
Hopefully one day someone comes along with a solid solution - Or the new realtime API handles this differently (I'm yet to dig into that too much yet)


In the web code samples, what class is "services" an instance of?

Knowing that would make the samples more useful. I'm trying to rewrite ADAL stuff out of an old MVC project, including replacing an ADAL TokenCache implementation.

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

ID: ff6b0d71-daf8-e75a-5157-a8a3c1c8bf1a
Version Independent ID: 64d94165-c058-3867-fc63-6d816399fde4
Content: Token cache serialization (MSAL.NET) - Microsoft identity platform
Content Source: articles/active-directory/develop/msal-net-token-cache-serialization.md
Service: active-directory
Sub-service: develop
GitHub Login: @jmprieur
Microsoft Alias: jmprieur

@degrover-cn Thanks for your feedback! We will investigate and update as appropriate.

@degrover-cn Good call-out - that's an IServiceCollection, and those lines are taken from Startup.cs in an ASP.NET Core application.
I'll add some clarification to reduce confusion.
#reassign:mmacy

Thanks, very helpful.
From: Marsh Macy<EMAIL_ADDRESS>Sent: Thursday, August 6, 2020 10:41 AM
To: MicrosoftDocs/azure-docs<EMAIL_ADDRESS>Cc: Russell H. DeGrove<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [MicrosoftDocs/azure-docs] In the web code samples, what class is "services" an instance of? (#60327)
@degrover-cnhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdegrover-cn&data=02|01|russell.degrove%40cloudnav.com|47bc5168b19443c5d6b408d83a16cacb|2c7f719da7304a44b8190fd5531f62c8|0|0|637323216862659803&sdata=nY6YdRgsbCOFYvlDE3SO49veFEIuGgj8dSDCUfJL4NU%3D&reserved=0 Good call-out - that's an IServiceCollectionhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fdotnet%2Fapi%2Fmicrosoft.extensions.dependencyinjection.iservicecollection&data=02|01|russell.degrove%40cloudnav.com|47bc5168b19443c5d6b408d83a16cacb|2c7f719da7304a44b8190fd5531f62c8|0|0|637323216862659803&sdata=Hxwp6mvOufqG74Ei%2FSeHfAu8uR5ohObsRe16XcjzQ3U%3D&reserved=0, and those lines are taken from Startup.cs in an ASP.NET Core applicationhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Faspnet%2Fcore%2Ffundamentals%2Fstartup&data=02|01|russell.degrove%40cloudnav.com|47bc5168b19443c5d6b408d83a16cacb|2c7f719da7304a44b8190fd5531f62c8|0|0|637323216862669795&sdata=X%2F%2BX7xamFMQGcmZbvk%2B1RVAaeuk4rbtH19%2BzeXxmez4%3D&reserved=0.
I'll add some clarification to reduce confusion.
#reassign:mmacy
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fazure-docs%2Fissues%2F60327%23issuecomment-669970483&data=02|01|russell.degrove%40cloudnav.com|47bc5168b19443c5d6b408d83a16cacb|2c7f719da7304a44b8190fd5531f62c8|0|0|637323216862669795&sdata=VFJifo8Jlg9WieNZBuX%2Bieo3f%2BZPvBO6PLRFwaYk25w%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAM2X5S7SVJJHGQRSWUB2YH3R7K6JHANCNFSM4PV2SJBA&data=02|01|russell.degrove%40cloudnav.com|47bc5168b19443c5d6b408d83a16cacb|2c7f719da7304a44b8190fd5531f62c8|0|0|637323216862679799&sdata=iYFyYdYBuaGiZ03PC4zN6PvEiyjmh6hUDyKkh%2Bfcm3g%3D&reserved=0.

Only Microsoft employees can manage issues via commenting in this repo.

@degrover-cn The following update will go live sometime after the 10AM PDT publish today - thanks again for helping us improve our docs!


Resolve scratch_ensemble paths

Closes https://github.com/equinor/webviz-subsurface/issues/128

Discussed with @HansKallekleiv - we will solve it using a different approach keeping FMU out of webviz-config.


Simple pointer arithmetic does not work

Describe the bug
Below is the code with 'minimal' repro for the problem -
SEC("xdp")
int xdp_ptr(xdp_md_t* ctx)
{
    const void* p = ctx->data;

    if (p + 1 < ctx->data_end) {
        const uint16_t ofs = *(uint16_t *)p;
        p += ofs; // new pkt position

        if (p + 1 < ctx->data_end) {
            bpf_printk("data -> %d", *(uint16_t *)p);
        }
    }
    return XDP_PASS;
}

When parsing packets, we sometimes (often) need to jump forward by variable size offsets, and this currently seems to break the verifier. Note that when we try to de-reference uint8_t (instead of uint16_t), at least this simple example works (but not necessarily more complex ones).
OS information
No response
Steps taken to reproduce bug
Use the xdp program above and try to compile/verify.
Expected behavior
Should succeed and display the data upon run, if posssible.
Actual outcome
Verification failure -
||   Compiling eBPF -> E:/my/ebpfwin/net/xdp_ptr.c ...
||   Verification failed
||
||   Verification report:
||
||   ; E:/my/ebpfwin/net/xdp_ptr.c:13
||   ;         if (p + 1 < ctx->data_end) {
||   9: Upper bound must be at most 65535 (valid_access(r3.offset) for comparison/subtraction)
||   ; E:/my/ebpfwin/net/xdp_ptr.c:13
||   ;         if (p + 1 < ctx->data_end) {
||   9: Upper bound must be at most 65535 (r3.type == r2.type in {ctx, stack, packet})
||
||   2 errors
||
||
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets|248 col 5| error MSB8066: Custom build for 'E:\my\ebpfwin\build\CMakeFiles\f30f5e48f0c4dc8e89c421a339f60df8\xdp_ptr.o.rule;E:\my\ebpfwin\build\CMakeFiles\12477acb48a29a8e7b43cd79b7dbdba2\net_ebpf.rule' exited with code 1. [E:\my\ebpfwin\build\net\net_ebpf.vcxproj]

Additional details
No response

Please file this bug in the prevail repository: https://github.com/vbpf/ebpf-verifier


Dev1

@spkumar17 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


docs: update JSON API response with current shape

As the API has evolved over time, update the example in the docs to reflect current keys.
Closes #8011
Signed-off-by: Mike Fiedler<EMAIL_ADDRESS>

@di I don't know how "true" you wanted the response to be - it actually highlighted the "license" issue noted in #12392 and I manually trimmed the result for the docs.


How do you hotreload multiple entries of HTML files ?

entry: { // 'webpack/hot/dev-server', added with --inline --hot
    index: ['webpack-dev-server/client?http://localhost:8080', './src/index/index.js'],
    biz: ['webpack-dev-server/client?http://localhost:8080', './src/biz/biz.js'],
    home: ['webpack-dev-server/client?http://localhost:8080', './src/home/home.js']
  },

This is what I tried and it didn't work as expected. What did I do wrong ?

Sorted it with
entry: {      index: ['webpack-dev-server/client?' + publicPath1, 'webpack/hot/only-dev-server', './src/index/index.js'],     biz: ['webpack-dev-server/client?' + publicPath1, 'webpack/hot/only-dev-server', './src/biz/biz.js'],     home: ['webpack-dev-server/client?' + publicPath1, 'webpack/hot/only-dev-server', './src/home/home.js']   },


fix(deploy): compose configs

Issue link
Relates #82 , #124
What does this PR do?

Fixed volume mounts to nginx container in compose
Renamed container, where Django application will run, in compose.yaml
Updated sanity check jobs in CI with renaming service

What does not include in this PR?
N/A

Confirmed all container have started up properly:
(Python:3.12.1 .venv) 24-01-28 23:08:27 git/bennu-official [fix/82/nginx_compose] % docker compose up --build --detach
[+] Running 7/7
 ✔ Network bennu-official_default                                                                                Created                                                        0.0s
 ✔ Volume "bennu-official_mysql-data"                                                                                Created                                                        0.0s
 ✔ Volume "bennu-official_staticfiles"                                                                                Created                                                        0.0s
 ✔ Container mysql                                                                                Started                                                        0.0s
 ✔ Container gunicorn                                                                                Started                                                        0.0s
 ✔ Container nginx                                                                                Started                                                        0.0s

(Python:3.12.1 .venv) 24-01-28 23:09:03 git/bennu-official [fix/82/nginx_compose] % docker container ls
CONTAINER ID   IMAGE                                   COMMAND                  CREATED          STATUS          PORTS                                                 NAMES
0643777a1d72   bitnami/nginx:latest                    "/opt/bitnami/script…"   26 seconds ago   Up 26 seconds   8080/tcp, <IP_ADDRESS>:8443->8443/tcp, :::8443->8443/tcp   nginx
b5d60330aec6   ghcr.io/hwakabh/bennu-official:latest   "/cnb/process/web"       26 seconds ago   Up 26 seconds   <IP_ADDRESS>:8000->8000/tcp, :::8000->8000/tcp, 8080/tcp   gunicorn
3555b0cbaf6c   bitnami/mysql:latest                    "/opt/bitnami/script…"   26 seconds ago   Up 26 seconds   <IP_ADDRESS>:3306->3306/tcp, :::3306->3306/tcp             mysql

(Python:3.12.1 .venv) 24-01-28 23:09:08 git/bennu-official [fix/82/nginx_compose] % docker exec -u root -it nginx nginx -t
nginx: the configuration file /opt/bitnami/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /opt/bitnami/nginx/conf/nginx.conf test is successful


UHF-9513: Autowire services, feature toggle functionality, rotate UID1 password on deploy

How to install

composer require drupal/helfi_api_base:dev-UHF-9513
drush updb

How to test

[ ] Change UID 1 user's password to something you know, for example drush upwd helfi-admin 123 and make sure you can log-in using the password
[ ] Run drush helfi:post-deploy and make sure the password is changed and you can no longer log-in using the password

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

Project coverage is 81.93%. Comparing base (572939c) to head (3f3a89c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #160      +/-   ##
============================================
+ Coverage     81.53%   81.93%   +0.40%
- Complexity      540      554      +14
============================================
  Files            73       75       +2
  Lines          1836     1877      +41
============================================
+ Hits           1497     1538      +41
  Misses          339      339

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


Update README with working example shell invocation

I guess example_options.json was moved into a doc directory but the example usage in the README was not updated.

Thanks! Merged.


Android datepicker is not showing correctly

Describe the bug
The datepicker has a white area at the right side as a padding.
To Reproduce
Steps to reproduce the behavior:

Open datepicker
See error

Expected behavior
The datepicker should not have that space in the right side.
Screenshots

Smartphone:

Device: Samsung galaxy note 10 lite
OS: Android 10
Browser: chrome

Hello @jesusbarrientos.
Sorry for the delay in responding.
When you use the native date flag, do you have this same problem? I believe this may be due to the size of your display. The display, size and shape of the date picker is something defined by android itself, it is as if this place were something that I have no control over. I will try to reproduce the problem in some emulator and give you feedback, but I would like you to try something for me. Try using <input type="date" /> to see if the problem can also appear like this

Thanks for reply @danielprrazevedo .
I'm using datepicker as mentioned in README Usage section.

I don't use input of type date because in mobile browsers it shows an icon that it can't hide. For that reason I use datepicker programatically.

I'm having this issue as well. Date picker does not display the correct value in date, min and max parameter and font color as well.

{ date: '28/02/2021' } and the format is DD/MM/YYYY using moment-timezone

This problem is different from the one mentioned, it just indicates that the selector is being displayed with a kind of padding inside the modal, in your case the selector is working with dates in the wrong way. We'll deal with that in another issue, okay?

@danielprrazevedo Sure. Thank you

Describe the bug
The datepicker has a white area at the right side as a padding.
To Reproduce
Steps to reproduce the behavior:

Open datepicker
See error

Expected behavior
The datepicker should not have that space in the right side.
Screenshots

Smartphone:

Device: Samsung galaxy note 10 lite
OS: Android 10
Browser: chrome

I have the same issue as well and on top of that, the app crashes when changing device orientation (landscape/portrait) while the date picker is present.
Device:
Samsung A50
OS: Android 10

me too, encountered the same issue The datepicker has a white area at the right side as a padding. would like to know if we have the update or fix for this issue, thanks

Any updates? Issue still exists


S refactor and test

This resolves #175, #209, #214, #216, #222.
Resolved the issue regarding inconsistent index error message.

LGTM 👍


Minimum supported version for C compiler

Define GCC and clang minimum supported versions.

gcc 4.8 it is. Maybe someone has stronger requirements @polubelova @Frosne @protz ?

There was a blog post somewhere where Mirage folks were unhappy with the __has_include (which we should now be able to get rid of). According to https://en.cppreference.com/w/cpp/compiler_support this is in GCC 5. So maybe they, too, we reliant on GCC 4.8...

I think @Frosne is running into exactly that right now in our CI.

I'm happy to approve a PR that removes __has_include from lib/c/* and assumes everyone runs configure and thus has a valid config.h -- Mozilla has a hand-written config.h, correct?

For now I solved it using these lines:
#if defined(__has_include)
#if __has_include("config.h")
#include "config.h"
#endif
#endif
If we don't want to remove config, it could be a way to go.

Interesting. But then are you compiling AVX or AVX2 code? How are you defining HACL_CAN_COMPILE_VEC128?

With these lines we have gcc-4.4 compiler also passes CI :)

Interesting. But then are you compiling AVX or AVX2 code? How are you defining HACL_CAN_COMPILE_VEC128?

By adding -DHACL_CAN_COMPILE_VEC128/256 to CFLAGS

Ok I thought about it and I believe your solution is actually even better. This means clients who want to integrate HACL have two options:

-D... compiler options using their favorite build system to enable features depending on target support
just running the configure script and leaving it up to us to set those flags in config.h -- this works for simple situations, but not all (e.g. cross-compiling on x64)

I'm happy to approve a PR to that effect. There are only a handful of places that use __has_include

To be closed once I finish & merge https://github.com/hacl-star/hacl-star/pull/561


enhance code

enhance get()  for easy readability

Hi @Saneeitas, please raise a pull request if you're adding a necessary/relevant feature or fixing a bug. Here, you're contributing just for the sake of contributing and that's not cool. Thanks.


z-index issue with length indicators and the other overlays

In this case I think the menu should be on top since it's what the user just opened the menu.
CC @nadr0 @franknoirot

If we apply the z-40 or z-50 CSS class to the menu I'm pretty sure it'll overtake the CSS2DRenderer layer used by the leng indicator

Can we use detailed CSS class names to indicate the Z layering? That can help when reading the code to see what features will be at what layer.


Remove Unused Import

Kind (Required)
Choose the suitable template if exists.

Improvement

Overview (Required)

Remove the unused import

Links

https://github.com/DroidKaigi/conference-app-2021/blob/de419ff444be83b94b1347d6597a90f36306dcab/uicomponent-compose/other/src/main/java/io/github/droidkaigi/feeder/about/AboutThisApp.kt#L27

Thank you for reporting!

✋

Thanks! Assigned 👍


Add HTTP 418

Done! :)
I did not notice the alphabetical order.

Thanks for the contribution. Will bump the version shortly.


feat: Support multiple repositories specified from the same line (#308)

Added support for issue #308

I could only knew how to test going with the route of reaching to AddRepoState.kt.
It's not very clear how to make the sourcerer cli built on my local environment.
The ticket is talking about running the command sourcerer add 1 2 3.
I only did it via java -jar build/libs/sourcerer.jar which seems to be going on a different flow.


Confirmation popup

Right now the confirmation popup is divided in 4 parts, similar to conda command line interface. Most of the time the same package appear in multiple sections. I think it doesn't work well with a gui, I would expect a table indicating for each package what action will be performed (uninstall, unlink, download...).
This is a relocation of https://github.com/spyder-ide/spyder/issues/2133
(BTW, what happened to your "Working on this from next week!" ? :p )

I did work, that does not mean I finished! haha
Shit happens :sweat_smile: ?

@Nodd In the case of packages being removed, what would you expect...
For instance lets say we install numpy 1.7 and remove 1.6
You would like to see
Numpy 1.6 (unlink)
Numpy 1.7 (download, extract, link)

And in the case of multiple packages? always list first the ones to unlink? or on after the other?
package 1.1
package 1.2
papa 1.6
papa 1.7

or ?

How about a table ? Something like:

Name
unlink
link
download
extract

Numpy
1.6
1.7
1.7
1.7

Foo
0.6

Bar

2.8
2.8
2.8

The best would be to indicate the number of bytes to download if the information is available.

Good idea :), yes the size info is available.
As soon as I finish this one I will test your plugins PR, did you manage to fix the error you got?

Not yet, but I think having different spyder versions installed is a bit problematic (since spyderplugins in master is not a namespace plugin).

This is almost ready @Nodd :p

The download column should have the size... (or be hidden when no package is going to be downloaded.) almost there...!

Gorgeous !
Looks like there is lots of space on left and right, is it from your theme ?

Hmmm good point, I will check :p

@nodd ... finally!!
Pushing soon :-)

Nice!!

Beautiful ! Better than in my dreams ! :smile:


xview_stepper implementation

The current implementation of xview_stepper assumes a uniform step_size per slice, and adds it to the underlying iterator when stepping. This is somehow equivalent to a strided view.
However, if we want to implement slices such as "contains indices" or "drop indices" (i.e. slices that check that the given index is or is not in a given list), this implementation needs to be improved. For now, the only solution I see is to add a parameter to the step_size method of the slices, this parameter being the current index in the given dimension.
That implies tracking the full index in the stepper view (meaning additional memory allocation) and thus I wonder if going for an xindex_stepper could be more efficient.

I am closing this issue as we've implemented this for the new islice


[Interop] Tests for SSA and GAMMA

This is just an initial scope of tests. Much of this code was written by @ginayeh . I just did the final polish/integration step.
There are 3 main tests included:

The GAMMA baseline test, including the actual GAMMA API rather than vendor extensions.
Kubernetes-based stateful session affinity tests, where the mesh (including SSA configuration) is configured using CRDs
GCP-based stateful session affinity tests, where the mesh is configured using the networkservices APIs directly

Tests 1 and 2 will run in both prod and GKE staging, i.e. container.googleapis.com and staging-container.sandbox.googleapis.com. The latter of these will act as an early detection mechanism for regressions in the controller that translates Gateway resources into networkservices resources.
Test 3 will run against staging-networkservices.sandbox.googleapis.com to act as an early detection mechanism for regressions in the control plane SSA implementation.
The scope of the SSA tests is still fairly minimal. Session drain testing is in-progress but not included in this PR, though several elements required for it are (grace period, pre-stop hook, and the ability to kill a single pod in a deployment).

[ ] grpc/java/v1.58.x/branch/xds_k8s_lb
[ ] grpc/java/v1.58.x/branch/psm-security
[ ] grpc/java/v1.58.x/branch/xds_url_map


fix #194: label --resource-type flag

What does this fix or implement?
#194
Added custom flag type which ensures value provided for --resource-type is in set of  datacenter,server,volume,ipblock,snapshot . (each type corresponds to a specific api endpoint GET call - and consequently go-sdk list func)
Added requirement for resource-id depending on which resource is wanted
Fix filters, maxResults, orderBy, etc.

Checklist

[x] PR name added as appropriate (e.g. feat:/fix:/doc:/test:/refactor:)
[x] Tests added or updated
[ ] Documentation updated
[ ] Sonar Cloud Scan
[ ] Changelog updated and version incremented (label: upcoming release)
[ ] Github Issue linked if any
[ ] Jira task updated

rebased this branch on top of master


Backdrop for luigi main view

Confirm these statements before you submit your pull request:

[x] I have read and submitted the required Contributor Licence Agreements.
[x] This pull request follows the contributing guidelines, recommended Git workflow, and templates.
[x] I have tested my changes.
[x] I have updated the relevant documentation.

Description
Changes proposed in this pull request:

Remove scroll bar on left nav and double border on top navbar

Issue link

Closed as pull request was invalid.


Master

This PR fixes #

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


Prevent double counting

Currently someone could set up a simple script that repeatedly fires HTTP POSTs to the update endpoint. I need to figure out a smart way of stopping them from doing this.

Fixed this by recording IP address


Unable to override colsVisibility.css settings by theme CSS

Enhancement/feature description
I see this loading order for CSS styles:

inline
tablefilter.css
theme's css
colsVisibility.css

That means I cannot easily override the styles defined in colsVisibility.css.
Why would the enhancement be useful to most users
To match the style of the colsVisibility extension to the theme, it would be beneficial if it is loaded before the theme's CSS style sheet.
Screenshots and GIFs
From Style Editor of Firefox

Describe alternatives you've considered
Overriding styles (width, margin) later with Javascript ...
TableFilter Version: 0.7.3
Browser and version: Edge 108.0.1462.46 (Official build) (64-bit), Firefox 102.5.0esr (64-bit
OS and version: Windows 10, Linux Red Hat 7.9
Device: PC

Hi @svenj69,
Extensions like Columns Visibility are loaded asynchronously with associated stylesheet, that's why you have that order.
Not sure if a viable option for you, but you can define your own stylesheet for an extension, certainly some overhead involved:
var config = {
...
  extensions: [{
    name: 'sort',
    stylesheet: 'my-stylesheet.css' // needs to be placed in `/style` folder or what is defined in `style_path` configuration option
  }],
};

Cheers

@koalyptus
thanks for the hint. I was not aware of the styelsheet option. This approach works for me.
Kind regards
Sven


Campaign order

For some reason order of the campaigns changed at main page :octopus:

Order by create time


Type definition overhaul

While browsing through chevrotain's code in search of solutions for my stupidities, I often came across weird typings or explicit mistakes (which I've submitted PR's for).
This made me think: where does api.d.ts actually come from? Is it written by hand (which would explain the mismatches), auto-generated (which wouldn't explain why I'm allowed to PR changes to it), auto generated once and then manually edited or perhaps something else?
I'm asking because I'm increasingly getting the feeling that api.d.ts and the actual code are hugely out of sync. This isn't very surprising when having a manual definition file (it's the biggest issue for projects like DefinitelyTyped), but I don't see a reason why the definition file shouldn't be auto-generated if the code is already written in typescript. On top of these typesafety concerns, it also makes it very hard to find where certain methods are actually defined, which makes navigating the (rather complicated) codebase even harder.
If there's not actually a reason for things being like they are now I'd like to propose a rather radical change: abolish the api.d.ts file and define all typings in-code (like most projects do). This prevents "loss of sync" by definition, and makes it basically impossible to "forget to update the typings".
This will require pretty much a full audit of all source code, but I'm 100% certain it will provide many long-term benefits, especially regarding typesafety. While browsing I saw a lot of unsafe (maybe unnecessary) type assertions, most of these could probably be fixed (removing technical debt). It'd probably also be a good idea to enable strict-mode for an extra increase in typesafety; this makes using this library much more convenient for users with strict-mode enabled (most people these days). Also I'd think that such an extra safeguard would be very welcome for such a complicated codebase.
I understand that this is quite a big (and time consuming) change. I wouldn't propose it if I didn't think it was a necessary improvement (you could even say fix).
If you think: "nah I don't want that at all", that's completely fine. It's your library after all, and it has worked very well for me 😄
If you think: "hmmm, that would be a helpful improvement", I'll be happy to help out wherever I can.
Finally, if you think: "that would be a good improvement, but I don't have the time for it", I'll happily volunteer myself as the one to do it (once I finish my next deadline in about 6 weeks).
You'll of course still have to review the PR, which isn't the easiest process in the world, but it'll still provide the great (long-term) benefits with a whole lot less effort on your side. Plus it's probably a great way for me to learn the codebase 😉
Again if you feel like this is "too much" or "unnecessary", that's perfectly fine. The library is very stable even without these extra safeguards, although using it can be a bit confusing sometimes 😉

The Type Signatures are manually written, however their initial version was auto-generated from the sources. In fact in the past the d.ts files was fully auto-generated from files with a _public suffix.
It was a conscious decision to deal with the generation as a separate concern to:

better track breaking changes,
Better way to separate public vs "internal" apis.
Increase quality of the JSDocs in the api.d.ts vs the "internal" APIs.

this does not mean we lose (all) the type checking of the TypeScript compiler however
The implementation (95%) is matched against the APIs, see:

https://github.com/SAP/chevrotain/blob/master/packages/chevrotain/test_integration/definitions/api_type_checking.ts

I feel that the API should be developed separately, yes it needs to be aligned to the implementation
(which we mostly get automatically) but we also need to be able to track the changes to it separately and apply different standards to the API source code vs implementation source code.
The type issues you are seeing actually seem like either original mistakes that would not be detected
if the api was auto generated.

mandatory properties defined as optional.

Or legacy leftovers that were not properly removed, which may have been handled better if at the time those features were removed we would have treated the public APIs separately.

tokenName property that need to be removed.

You work on improving the Type Signatures is greatly appreciated, I do not use TypeScript in most (smaller) projects so I do not encounter these type errors... Keep it up 🥇

better track breaking changes,
Better way to separate public vs "internal" apis.

Although these reasons are very true and valid, I think having accurate type definitions by definition is much more valuable for the project, both for developers and users. If the type definitions are based on and the same as the actual code it's impossible for them to get misaligned.
I don't think spotting a breaking change would become much harder, we just need to pay attention to the typings in a different place. In return we don't have to make sure we correctly change both definition and declaration for every single change.
On the issue of separation between internal and public code: I don't really know if there's a good solution for that. I haven't been in the JS/TS ecosystem for very long, but it looks to me like most projects don't really care that much about it either (I could be very wrong on that though). It'd be perfect if TypeScript supported module-private access control, but it doesn't seem like there's much "enthusiasm" for implementing that right now.

Increase quality of the JSDocs in the api.d.ts vs the "internal" APIs.

I'm not sure I understand you on this point... What's the difference between writing the JSDoc "in-code" vs in a separate definition file? In my experience, putting it in a separate file makes it harder to read the code as 'newcomer' because you have to look in two separate places for implementation and documentation.
One of the biggest reason why I'm suggesting this change is that it makes navigating the code a lot easier. Currently when I use the 'go to declaration' feature in my IDE it sends me to the declaration file, which doesn't really help me at all.

The implementation (95%) is matched against the APIs, see: (...)

I tried very hard but I can't figure out what this test does 😅 Could you help me a little?

I feel that the API should be developed separately, yes it needs to be aligned to the implementation
(which we mostly get automatically) but we also need to be able to track the changes to it separately

I'm not sure I understand you here. Isn't the problem that the definitions aren't generated automatically by tsc?
Tracking breaking changes based on a type definition file could still be done by comparing the generated definition files.
Because the definition file shouldn't be stored in source control anymore you wouldn't get a diff on it for incoming PR's, but if you really want that it probably wouldn't be that hard to write a script that compiles incoming PR's and shows a diff on the generated type definitions.

and apply different standards to the API source code vs implementation source code.

What kind of standards do you mean? What's the difference between API source code and implementation source code?

The type issues you are seeing actually seem like either original mistakes that would not be detected
if the api was auto generated.

It's true that the 'unnecessary optional' mistakes would not have been caught by the compiler, but some of the other "weirdness" would have stood out more if the definitions were the same as the declaration. I'm probably not explaining myself well here, so please ignore this point if it makes no sense 😅
Another thing to consider is that some of the misalignments might come from the unsafe type assertions. I think a full audit of the source code to remove those (and preferable also to enable strict-compilation) would be a good improvement for the project, even if we keep the definitions separate and manual.

legacy leftovers that were not properly removed, which may have been handled better if at the time those features were removed we would have treated the public APIs separately and conciously thought about it when making changes.

These leftovers wouldn't stick around in auto-generated type definitions. This is a good example of another reason why I'm not a fan of manually maintained type definitions: massive code duplication. The declaration/definition for these legacy (and all other) properties/functions/methods/... exist in two separate places with (hopefully, but unfortunately not always) exactly the same content. That doesn't really make a lot of sense to me, it just leaves room for mistakes leading to misalignment.
Conscious public API design is always necessary, I don't see a reason why it matters where the definition for it is, all the public API definitions are still there and still need to be thought out. You could argue that you're not editing in a 'nice and easy summary' anymore, but that probably isn't a very safe way to do things anyway, since it can very easily lead to misalignment between definition and declaration+implementation.

You work on improving the Type Signatures is greatly appreciated, I do not use TypeScript in most (smaller) projects so I do not encounter these type errors, so it really helps!
Keep it up 🥇

That's great to hear 😄 I'll definitely continue fixing all the mistakes I find.

Woah that comment turned out way longer than I thought it'd be. Although probably a lot of space is taken up by the quotes...
I just want to emphasize that I'm not trying to say that you have to do this, I just hope that you can make an informed decision based on these arguments.
I believe that healthy and open debate is an important thing in software development, especially for open source projects. If at the end of the day (or debate in this case) you still think having a manual definition file is the way to go, that's entirely up to you.

I will read & reply fully tomorrow.

I just want to emphasize that I'm not trying to say that you have to do this, I just hope that you can make an informed decision based on these arguments.

Don't worry this is all a discussion in good spirit :)

I will read & reply fully tomorrow.

Of course take your time 😄

Don't worry this is all a discussion in good spirit :)

I'm glad you see it that way, unfortunately not everyone does nowadays...

General reply
I think you may be placing a-lot value in the accuracy of the API and avoiding duplication.
While I am putting more value in the consistency and life-cycle of the API facing external consumers. I think the "price paid" for that is only 5% accuracy but ~50% duplication.
I had a system in place to generate the APIs years ago, it did not work well imho...

Although these reasons are very true and valid, I think having accurate type definitions by definition is much more valuable for the project, both for developers and users. If the type definitions are based on and the same as the actual code it's impossible for them to get misaligned.

I think this is the basic assumption we disagree on. The issues we recently found in the APIs were in interfaces, those interfaces are not duplicated and the implementation is already aligned with these interfaces so I do not see how we would have improved the type signatures by moving the interfaces to a different file...

In return we don't have to make sure we correctly change both definition and declaration for every single change.

We don't have to make sure of this now, it is detected automatically.

Example Failing build

I'm not sure I understand you on this point... What's the difference between writing the JSDoc "in-code" vs in a separate definition file?

One gets generated to an API website, so the quality of the JSDocs must be higher
and specific syntax constraints need be maintained.

https://sap.github.io/chevrotain/documentation/6_2_0/globals.html

It's true that the 'unnecessary optional' mistakes would not have been caught by the compiler, but some of the other "weirdness" would have stood out more if the definitions were the same as the declaration.

Maybe... can you show some concrete issues that would not be detected now
but would be detected if we generated the d.ts?

Another thing to consider is that some of the misalignments might come from the unsafe type assertions. I think a full audit of the source code to remove those (and preferable also to enable strict-compilation) would be a good improvement for the project, even if we keep the definitions separate and manual.

That is a different topic, In theory I agree, in practice TypeScript sometimes "gets in the way" maybe I am not proficient enough with it or maybe I sometimes do too "dynamic" things for it to handle or maybe some of the code base is from a time before TypeScript had the relevant advanced features.

This is a good example of another reason why I'm not a fan of manually maintained type definitions: massive code duplication. The declaration/definition for these legacy (and all other) properties/functions/methods/... exist in two separate places with (hopefully, but unfortunately not always) exactly the same content. That doesn't really make a lot of sense to me, it just leaves room for mistakes leading to misalignment.

This is how many projects in different eco-systems are built, the separation of interfaces and implementation is not a new concept. it does create duplication, but those are mostly auto verified
so if somebody changes the implementation code and it no longer fits the APIs the build will break.
Which is better than changing the combined Impl + API and unexpectedly breaking/changing the public interfaces without knowing (IMHO).

Conscious public API design is always necessary, I don't see a reason why it matters where the definition for it is, all the public API definitions are still there and still need to be thought out. You could argue that you're not editing in a 'nice and easy summary' anymore, but that probably isn't a very safe way to do things anyway, since it can very easily lead to misalignment between definition and declaration+implementation.

I don't think it leads to mis-alignment so much as duplication...
Example:

api.d.ts interfaces imported and used in the Lexer implementation
Small Change to Lexer.tokenize signature causing the build to fail automatically

$ tsc --noImplicitAny test_integration/definitions/api_type_checking.ts --outDir dev/garbage --lib "es2015"
test_integration/definitions/api_type_checking.ts:9:9 - error TS2344: Type 'typeof import("C:/workspace/chevrotain/packages/chevrotain/lib/src/api") & { BaseParser: any; Parser: any
; CstParser: any; EmbeddedActionsParser: any; MismatchedTokenException: ErrorConstructor; NoViableAltException: ErrorConstructor; NotAllInputParsedException: ErrorConstructor; Early
ExitException: ErrorConstructor...' does not satisfy the constraint 'typeof import("C:/workspace/chevrotain/packages/chevrotain/lib/api")'.
  Types of property 'Lexer' are incompatible.
    Type 'typeof import("C:/workspace/chevrotain/packages/chevrotain/lib/src/scan/lexer_public").Lexer' is not assignable to type 'typeof chevrotain.Lexer'.
      Type 'import("C:/workspace/chevrotain/packages/chevrotain/lib/src/scan/lexer_public").Lexer' is not assignable to type 'chevrotain.Lexer'.
        Types of property 'tokenize' are incompatible.
          Type '(text: string, initialMode?: string) => string | ILexingResult' is not assignable to type '(text: string, initialMode?: string) => ILexingResult'.
            Type 'string | ILexingResult' is not assignable to type 'ILexingResult'.
              Type 'string' is not assignable to type 'ILexingResult'.

After reading this and researching a bit more myself I noticed that chevrotain mainly uses actual classes, for which external type definitions work a lot better than "loose functions". I also discovered that .d.ts type definitions work a bit different than I thought they did.
In the end my conclusion is that the external definitions aren't nearly as bad as I thought they would be. The 'find declaration' issue is still a big annoyance for me, but that'll probably get better the more I get to know the codebase.
Interfaces were indeed never duplicated, and the few mistakes I sent PR's for wouldn't have been caught if the definitions were auto-generated. I searched for the 'other weirdness' I mentioned, but I couldn't find it anymore. Perhaps I'm just imagining things (sleep deprivation...), but if I find them again I will send fixes of course.

One gets generated to an API website, so the quality of the JSDocs must be higher
and specific syntax constraints need be maintained.

This point I don't understand. Assuming it's possible to generate documentation for multiple files at once (never done it before), why do we need to write "two kinds of JSDocs"? Wouldn't it make more sense to write all the documentation in-code (for easy referral) and up to standards for the site?

That is a different topic, In theory I agree, in practice TypeScript sometimes "gets in the way" maybe I am not proficient enough with it or maybe I sometimes do too "dynamic" things for it to handle or maybe some of the code base is from a time before TypeScript had the relevant advanced features.

I think I'd be able to help you out with that. Typescript doesn't cover absolutely everything of course, but a lot of the assertions I saw were either completely unnecessary or unnecessarily unsafe (that's quite the tongue twister...).
If you want I could go over the source to fix these things, it'll provide a lot of long-term benefits and probably won't be limiting at all if we correctly use modern TypeScript features. Even if things do get a little too restrictive, we can always break out the as any guns 😉

This is how many projects in different eco-systems are built, the separation of interfaces and implementation is not a new concept. it does create duplication, but those are mostly auto verified
so if somebody changes the implementation code and it no longer fits the APIs the build will break.

This kind of separation isn't new of course, I just never encountered it in this form in the TS ecosystem. As I said before, apparently these external definitions work different than I thought, so I can see how this separation can outweigh the benefits of auto-generation.

In the end my conclusion is that the external definitions aren't nearly as bad as I thought they would be.

👍

why do we need to write "two kinds of JSDocs"?

It is not too kinds of docs, I meant are the actual text docs. e.g:

https://sap.github.io/chevrotain/documentation/6_2_0/classes/parser.html#option

If you want I could go over the source to fix these things, it'll provide a lot of long-term benefits and probably won't be limiting at all if we correctly use modern TypeScript features. Even if things do get a little too restrictive, we can always break out the as any guns 😉

Send a couple of small PRs and lets try this 👍


Optional parameters are no longer optional

[Enter feedback here]
Run 'az keyvault certificate show-deleted' command, but it keeps asking those optional parameters. The doc said those are optional but does not look optional anymore. Is it the bug in az keyvault module? or, an incorrect information on the document?

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

ID: a9c661d7-bf43-5354-015e-3859f30a42a2
Version Independent ID: fa69e552-5904-ce97-d02c-915c819bdde1
Content: az keyvault certificate
Content Source: latest/docs-ref-autogen/keyvault/certificate.yml
Service: key-vault
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

Key Vault