Minting rune

Hi,
Is it possible to construct a transaction to mint a Rune?

Hi
Yes, you can construct a rune minting psbt and send it to the wallet to sign. The wallet supports signing transactions with OP_RETURN outputs, but it won't finalise them, so you'll need to get the final PSBT, finalise it, and broadcast it.

There's an example in this PR: https://github.com/secretkeylabs/sats-connect/pull/91/files
I will close this.

@gregorym that's a bit different. We are releasing a sats-connect with a testnet beta version exposing our minting and etching API. It will be live in Mainnet at the halving. You're welcome to use it 😄 We'll be publishing the updated docs today with those endpoints. You get a lot of added extras like repeat mint functionality.
If you want to build a Mint PSBT yourself, it's a bit more involved and requires you to build the Rune OP_RETURN script yourself, but it is possible if you want to go that route.

Correction: The new sats-connect version is already released (v2.2.0). The docs just need an update, which will happen soooooon.

@victorkirov Got it.
What would be the difference between using your API vs building a mint PSBT?

If you build your own PSBT, you'd have to figure out the relevant mint OP_RETURN script and stick it in the PSBT. You'd also most likely only do 1 mint txn at a time.
With our mint offering, you can just call the mint rune op with the details of what you want to mint, along with how many repeats of the rune you want to mint (You can currently mint 20 times with a single op, to be increased in the near future). You can also specify how much you want to charge for the mint op from your dapp as an input and which address to receive those fees to, and we'll send them as part of the process.
Basically, it's a convenience op that we provide devs so they can focus on the UI and let us handle the technical bits.

we have some issue coming from the class wallet which does not recognize the provider
we tried some workaround but didn’t succeed
if you have a demo test or i can provide the code we did would be perfect

@fabienghr could you please open a new ticket with details about the issue you are facing?


Graphiql says "No Description" for type field despite description parameter in annotation is filled

Hi Bojan,
short question: Is it supposed that the "description" parameter of the @GraphQLQuery annotation is used as description for a type in the schema? If yes - shouldn't GraphiQL show that description? In my case I only see "No description" after clicking on a type in the schema browser.

The description from @GraphQLQuery should end up as the field description, while for a description of the type itself you'd commonly use one of @GraphQLInterface (placed on classes that are to be mapped as GraphQL interfaces), @GraphQLUnion (for Java interfaces that are to be mapped as unions in the schema) or @GraphQLType (for all other types).
All of these should be visible in GraphiQL, yes. If you're having issues, please provide a minimal example and I'll look into it.

So in my example I have the following POJO:
package foo.bar.domain;

import java.util.*;

import javax.persistence.*;

import io.leangen.graphql.annotations.GraphQLQuery;
import io.leangen.graphql.annotations.types.GraphQLType;
import lombok.*;

@Entity
@Table(name = "User")
@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@GraphQLType(name = "User", description = "User type")
public class User extends AbstractEntity {

  private static final long serialVersionUID = 1L;

  @Column(name = "username")
  @GraphQLQuery(description = "Username of the user.")
  private String username;

  // ... further fields ...

}

So I would expect that Graphiql shows "Username of the user." as description for the field "username" in the type "user".
The user type description is shown, but after clicking on "username" Graphiql says "No Description".
Did I make any mistake with the annotations or is the field description not processed properly during Schema creation?

Ah, I see. SPQR doesn't look at private fields, so what gets exposed is the generated getter which does not have the annotation, so no description is mapped.
Normally, SPQR will expose the annotated element, so if the annotation is on a field, the field will be queried directly, not through the getter. If the getter is annotated, it gets called. In your case, you have a generated public getter and a private annotated field. SPQR ignores private elements, so it only detects the getter without the annotation.
Since this mixture is quite expected for Lombok, I'll add support for it. In the meantime, I'm afraid you'd have to have explicit getters and place the annotations there...
As a side note, I've never seen so many annotations on a single class before :)

That makes sense. Thanks for adding Lombok support.

As a side note, I've never seen so many annotations on a single class before :)

Yeah, another Lombok side effect :-)


x11: compute resize logical size with new dpi

This change does 2 things to the x11 backend:

change the order of processing of the contents of events so that checking the current monitor and retrieving the dpi is done before computing the logical size of the window
whenever the dpi changes, always queue a Resized event with the new, correct logical size

given on x11 the physical size is constant by default, a dpi change changes the logical size, so any previous logical size becomes wrong, hence the need for this event

This should hopefully fix #663, but I don't really have the environment to test it right now.
cc @chrisduerr

[x] Tested on all platforms changed
[x] Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
[x] Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
[ ] Created an example program if it would help users understand this functionality

I've linked Alacritty's glutin update PR against this change and was able to successfully use it on both Sway and i3 without any issues.

Alright, I've also clarified a little the DPI docs to clarify how to interpret the interaction between the Resized and HiDPIFactorChanged events.

r? @mitchmindtree or @francesca64 ?

Yes, this seems good to me, thanks!
Le 19 octobre 2018 06:22:07 GMT+02:00, Francesca Plebani<EMAIL_ADDRESS>a écrit :

Sorry this took me so long to get to! The code looks good, and I tested
it without any problems. Are the documentation edits I made alright
with you?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/tomaka/winit/pull/668#issuecomment-431240490


can't install

$ ./configure
sh: VERSION: No such file or directory
sh: crypto/VERSION: No such file or directory
sh: ssl/VERSION: No such file or directory
sh: tls/VERSION: No such file or directory
configure.ac:21: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.14/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:21: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

Tracing the scripts it seems to be caused by the autoreconf -i -f in deps/libressl-portable. Am I missing some dependency? I ran this as directed:
$ sudo apt-get install gcc g++ gobjc cmake automake autoconf libtool pkg-config

Sorry, this is a bug in the configure script. You need to run ./update.sh in the deps/libressl-portable dir first. I'll put together a change ASAP.

For now I've just added it to the "Basic Installation" steps in INSTALL.md. I'll open an issue for making LibreSSL setup easier.

Let me know if you can get it working now.

Yep, it compiled! Now when I try to run it I see this error:
Blog couldn't load template at .../blog/template/header.html
Blog server could not be initialized

Stopping StrongLink server...

The directory I gave it is just empty. Is it expecting some specific structure? Is it because I tried to run it directly from the build directory? (make install.. I'm not ready for that kind of commitment :) )

By default it tries to load templates from the installed path. What you can do instead is symlink (or copy) the res/blog directory into the repo directory that you're using.
Sorry for the problems, I'll add this to the install notes too!

Thanks! I actually went searching for header.html, but only inside build, I think.. Anyway, that got me past that hurdle. Now I get this:
TLS config error: failed to load certificate file

Any hints? I've never actually successfully setup SSL before..

If you want to run without TLS, you need to set the SERVER_PORT_TLS to NULL in src/blog/main.c.
I hope this is the last hurdle, I can't think of any others.

It's up!

That wasn't too bad at all :) I think you're too apologetic in your install instructions. Tell people they need to man up and build from source :D

Great! Thanks for being so patient and helping me discover a lot of first-run problems.
I'm apologetic because most people won't go through 1% of what you did. But the project is still young...

I have enough experience with my own projects to absolutely understand.

Can I ask what your interest is in StrongLink, what you'd like to get out of it or what you're looking for? And any other feedback you may have.

It was a combination of:
a) reading your substance guide and wanting to look at the code that led to it, that came out of a seemingly like-minded belief system (http://akkartik.name/post/readable-bad). I like looking at other people's code (the kind that has been lovingly cultivated), and it's a long-standing frustration that it's never as easy as it should be, no matter how hard the author tries: http://akkartik.name/about
b) reading your [https://bentrask.com/notes/content-addressing.html](principles of content addressing) and wanting to see what a platform that meets it feels like. I have my own private note-taking system (evolved out of a single notes file, now in version control, sends 1% of items tagged 'publish' to my site/blog) so I'm interested in this space (wiki notebooks, federated wikis, delicious folksonomies, etc.) and am constantly on the lookout for ideas to steal.
While I was trying to get it running I somehow failed to notice that it powers your blog. Are most of your notes hosted by Stronglink publicly accessible, or is it 1% tip-of-the-iceberg, 99% dark-matter like my system?

Ah, I now see [https://bentrask.com/?q=hash%3A%2F%2Fsha256%2F88d9e8eb7df18460da8d0c3996881f3a1c7fc95ab8e5c6ea9e250c8c49bc0910](this post of yours) which partially answers my question.

Reminds me of this ancient thing I built.

Wow, great stuff. I will read through everything you posted.
Of my notes about 1500 are public and 7000 are private. So it's a lot more than 1% but still a small fraction. I want to publish more of them over time but it's a lot of effort just going through them.
I tend to write about everything, so I will probably do a blog post on this discussion tonight/tomorrow. I will put full stats in there too (and explain the sln-stats tool that anyone can run).

I sent you an email. Let me know if you'd prefer to continue here or elsewhere.

I believe bug trackers should be considered the "user interface" of a software project, so I don't mind talking here to keep the conversation public if you want. And by all means please send me all your comments until you get bored!

BTW I don't have internet at home, so I basically only get online once a day (at most). That is why my responses are sometimes delayed.

https://bentrask.com/?q=hash://sha256/5feb5bb05d8295525286098d60551c40487141dde9e71599430339f4124a8a32
https://bentrask.com/?q=hash://sha256/304bfda69f145fd722f7a836d1a86dbe77731e21ed699bf0033c632a7e3e468c


Fix: '.to_datetime()' is not a method of a DataFrame in the latest

Pandas version.
Signed-off-by: peusterm<EMAIL_ADDRESS>

thx!


Implement Security Measures for the Application

Implement HTTPS to encrypt data in transit.
Use Helmet to set various HTTP headers for security.
Implement rate limiting to prevent brute-force attacks.
Use CSRF tokens to protect against Cross-Site Request Forgery attacks.
Validate and sanitize user input to prevent SQL injection and XSS attacks.
Set up proper error handling to avoid exposing sensitive information in error messages.


TypeError: f[e.data] is undefined on Firefox

When I'm using Firefox, there is a
TypeError: f[e.data] is undefined      HackTimer.min.js:1:538
on the console.
But the functions is still working fine, do you know what it means?
Thanks!

It seems that latest version of code differs from your
Please download latest version and tell me if the error still occurs


after command for all domains

Currently the code supports executing arbitrary commands after wake and asr commands.
It can be configured the following way:
pipelines:
  default:
    asr:
      name: faster-whisper.client
      after:
        command: |
          date +"%F %T,%3N after asr"
    wake:
      name: porcupine1
      after:
        command: |
          date +"%F %T,%3N after wake"

This PR adds support for the "after commands" for all other domains in a similar way.
They can be used for notification sounds, for flashing the led while rhasspy is listening, thinking, or speaking, also for logging or cleanup purposes where needed and other customization without the need to modify the code.

It appears to be duplicate of #17 (but covers more domains though)


Invalid access of mutable storage in an 'isolated function'

Description:
Visual Studio Code's problem pane (problem tab) displays  Invalid access of mutable storage in an 'isolated' function (BCE3943)  after opening the auto generated balleina gRPC stub _pb.bal file.
Describe your problem(s)
After generating stubs from the proto file (using ballerina gRPC compiler), if we open the _pb.bal file, above message appears on the problem tab of Visual Studio Code. Even though there are problems as per the below image, it compiles the code and generates relevant JAR(s).

Describe your solution(s)
N/A
Related Issues (optional):
N/A
Suggested Labels (optional):
N/A
Suggested Assignees (optional):
N/A

Is it possible to share the proto file? Or the relevant bal code?
Please also let us know the version with which this was observed.

Proto file for service 1
syntax = "proto3";
package test.apis;
service MyService1 {
    rpc LimitStatus(LimitMessage) returns (LimitMessage) {
    }
}
message LimitMessage {
  string data = 1;
}

Proto file for service 2
syntax = "proto3";
package test.apis;
service MyService2 {
    rpc LocationStatus(LocationMessage) returns (LocationMessage) {
    }
}
message LocationMessage {
  string data = 1;
}

ballerina version details:
Ballerina Swan Lake Beta 1
Language specification 2021R1
Update Tool 1.3.5

Thanks @slahirucd7.
The following needs to be done to reproduce this.
Add two files in a package.
In one file (say one.bal) add
public function main() {

}

In the other file (say two.bal) add
public isolated client class Client {

    isolated remote function LimitStatus() returns LimitMessage|error {
        anydata result = getTuple();
        return <LimitMessage>result;
    }
}

isolated function getTuple() returns anydata => 0;

public type LimitMessage record {|
    string data;
|};

When one.bal is modified (e.g., add or remove a new line), the error appears for two.bal. But this error goes away when two.bal is modified (similarly adding/removing lines with no change to the actual content).
When one.bal is modified again, the error reappears in two.bal.
Looping in @nadeeshaan also.
Tested with:
Swan Lake Beta2
VSCode Plugin 2.1.0

@MaryamZi This could be due to the subsequent compilations as we observed earlier.

I put a comment in https://github.com/ballerina-platform/ballerina-lang/issues/32650#issuecomment-919697019 regarding why this happens. Then further investigated the root cause with @pubudu91 .Within TypeChecker.visit(BLangTypeConversionExpr conversionExpr) method, we do the following:
BType exprCompatibleType = checkExpr(nodeCloner.cloneNode(expr), env, targetType);

where a clone of the node is passed just for type checking. It's within checkExpr where we create the new symbol and set it to the varRef. Since we don't use the cloned expr and continue using the original BLangTypeConversionExpr.expr, we have 2 different symbols;

Newly created variable symbol will be added to env
BLangTypeConversionExpr.expr which is a simpleVarRef will continue to have an old symbol.
This cause the equality check in IsolationAnalyzer#isReferenceToVarDefinedInSameInvokable() to fail.

Easy hack will be to implement equals() for variable symbols only and use that to check equality. But, there can be other similar places which we haven't discovered yet. @MaryamZi WDYT?

@IMS94, @pubudu91, and I discussed this offline and it seems to be happening due to a forced clone of the expression in a type cast expression. Removed this in https://github.com/ballerina-platform/ballerina-lang/pull/32775 since it was redundant anyway with the changes in https://github.com/ballerina-platform/ballerina-lang/pull/30966.


add command to remove image ?

Great tool !
This is a feature request: it would be great to be able to have an command to remove an image that has been uploaded.
Of course, this would imply to be authenticated (so you can only remove images that your account has uploaded), and I agree that would add some complexity.
So probably related to https://github.com/arnellebalane/imgur-upload-cli/issues/2
What do you think ? Doable ?

@skramm Removing an uploaded image from imgur is now available as of v1.1.0 of this package. Please update your version accordingly. Thanks for your request! 👍


Whether the model is suitable for the segmentation of small targets

HI,Thanks for your answer. I want to know that whether U2net is suitable for segmentation of small targets. I have trained my datasets which is small objects segmentation,but U2net predicted all 0, Nothing. Do i need change something ?

@JasonFinisher123 Hi，i have met the same problem.Have you sloved this problem about segmentation of small targets? Thanks for  your reply

U^2-Net resize the input image to 320x320. You have to double check if the
resizing reduce the target size to much. If yes, you may have to use a
large input size e.g. 640x640. If not, you can try to train more
iterations, because it usually takes more time to converge to the small
targets. If neither works, you may think about change of the loss weights
of different classes to balance the training process.
On Fri, Oct 30, 2020 at 4:28 AM JasonFinisher123<EMAIL_ADDRESS>wrote:

HI,Thanks for your answer. I want to know that whether U2net is suitable
for segmentation of small targets. I have trained my datasets which is
small objects segmentation,but U2net predicted all 0, Nothing. Do i need
change something ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/NathanUA/U-2-Net/issues/86, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADSGORMJJ7GV5WKEXO4UMHTSNKIOLANCNFSM4TEZ2IVQ
.

--
Xuebin Qin
PhD
Department of Computing Science
University of Alberta, Edmonton, AB, Canada
Homepage:https://webdocs.cs.ualberta.ca/~xuebin/


[CF-3045] enable multi_az for RDS database

This PR ensures that our RDS database can be deployed to multi AZ instead of single AZ

Module should allow disable Multi-AZ RDS if like. This could be useful during testing and saving cost.


[SP-5485] Added logic for handling self-defining variables by StringUtil

:white_check_mark: Build finished in 29m 51s
Build command:
mvn clean verify -B -e -Daudit -amd -pl core

:ok_hand: All tests passed!
Tests run: 4648, Failures: 0, Skipped: 7    Test Results

:information_source:  This is an automatic message


Likelihood evaluation uses .logpdf() method

The likelihood evaluation in tinyDA.Posterior uses the .logpdf() method of the probability distribution. This works only for distributions that are symmetric in the parameters and the data, such as the normal distribution.
The tinyDA.Posterior should be updated to use a .loglike() method instead to force users to use compliant distributions.

Closing this with https://github.com/mikkelbue/tinyDA/pull/36


feat: Update the method to set device locale

technically it is a breaking change but since it is anyway not used anywhere yet then yolo


Update Get-AzureADAuditSignInLogs.md

-All $true should be outside of the -filter parameter, not inside.

Docs Build status updates of commit 2e97e24:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

azureadps-2.0-preview/AzureAD/Get-AzureADAuditSignInLogs.md
:white_check_mark:Succeeded

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

Hi @andrew951
Per the read me file:
Please be aware that if you have any updates to automatically generated reference content, you should create an issue and not a PR.  The issue will then be created into a bug and triaged accordingly.  We do this because the reference content must mirror the *dll-help.xml file and subsequent updates to the reference content may overwrite any changes made through the repo.  Capturing it in the source code ensures that this does not occur.  Any PR with changes to automatically generated reference content will be closed.
Automatically generated reference content is any of the content under this Reference node, such as Get-AzureADUser
This only applies to reference content and not conceptual content.  Pull requests for changes to conceptual content are accepted and encouraged.  An example of the conceptual content is the Overview or a scenario such as importing data.
Thank you!
Bill


"dbt is not installed" because "cannot import name 'DEFAULT_PROFILES_DIR' from 'dbt.flags'"

Expected behavior
I wanted to activate the extension but even in the correct conda environment with dbt installed and working, it doesn't find the dbt extension. Python version 3.9.15, dbt 1.6.
Actual behavior
Activating the extension promts an error:
"An error occured while initializing the dbt project: cannot import name 'DEFAULT_PROFILES_DIR' from 'dbt.flags' (/data/home/xxx/yyy/miniconda3/envs/dbt/lib/python3.9/site-packages/dbt/flags.py)"
Steps To Reproduce
Activate the VS Code extension
Log output/Screenshots

Operating System
linux
dbt version
1.6
dbt Adapter
oracle & snowflake
dbt Power User version
0.11.6
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

This means that your vscode is outdated. You are not on the latest extension version. Please verify your vscode version and update/reinstall vscode.

You are absolutely correct. Issue closed. Thanks.


Use the 0.14.4 release

https://github.com/lyft/flytekit/commit/c78b571e2ed9dde4c491d53f12c9bdf9cd203083
Also add vim, tired of not having vim.

you have a git-sha hardcoded?

i was testing


Document API v1 endpoints

Create initial documentation for API endpoints, as well as updates the .gitignore to ignore the .idea directory for us jetbrains users.
Related to #60
Related to #8
Description
Endpoints documented:

[X] /api/v1/twitch-events
[x] /api/v1/heartbeat
[x] /api/v1/streamers
[x] /api/v1/twitch/scopes
[x] /api/v1/twitch/helix-endpoints

Create CI job to build the docs using mkdocs in the read the docs theme in prep for deploying them, see https://github.com/wwsean08/tau/actions/runs/975634598 as an example with the mkdocs artifact that you can open to view the docs live in your browser.
Motivation and Context
Make usage of tau easier for new users by documenting the various API endpoints.
How Has This Been Tested?
N/A
Types of changes

[X] Documentation

Checklist:

[X] My change requires a change to the documentation.
[X] I have updated the documentation accordingly.

No more changes planned unless there are changes requested.

This looks fantastic!  Thanks for all your hard work getting these endpoints documented @wwsean08.


fix lnd conf to use correct designators for min/max channel size

Tested against my beta box. Seems to work.


Agent <-> Relay communication is failing

something in https://github.com/googleforgames/quilkin/commit/b7a6c51cb0d5f4569c7dcfed6503c4ccb5ca1e2c is causing agent to relay communication to fail, but I can't figure out what, it doesn't have anything to do with the liveness check failing, because I can see it failing locally with just two local processes and their communication isn't dependent on those checks. Even more stranger https://github.com/googleforgames/quilkin/pull/836 fixes it but I can't figure out what.
The problem seems to be on the relay side, but even removing all of the relay code doesn't fix it.

Got some logs? Share where you see the failures happening?
I am noting that both PRs touch files in /src/cli/ - wondering if it's something in there?

@markmandel We tried replicating it again, but couldn't. It's odd I could consistently replicate it over the weekend on multiple machines, monday comes around, and I couldn't replicate it. I'll post more if I see it again, but what happens is essentially the agent warns that the connection has failed and reconnects.

Yurk. Flaky issues in production are the worst to nail down.

Wondering if what I'm seeing in #877 is similar to what you are seeing here? In the process of debugging, but figured I would check.

Hi folks, we appear to have a similar issue in our dev environment. Every 30 seconds the agent claims to lose its connection to the relay:
{"timestamp":"2024-05-01T08:30:30.061180Z","level":"WARN","fields":{"message":"lost connection to relay server, retrying"},"target":"quilkin::net::xds::client","filename":"src/net/xds/client.rs"}
{"timestamp":"2024-05-01T08:30:30.061207Z","level":"INFO","fields":{"message":"attempting to connect to `http://quilkin-relay-agones:7900/`"},"target":"quilkin::net::xds::client","filename":"src/net/xds/client.rs"}
{"timestamp":"2024-05-01T08:30:30.062011Z","level":"INFO","fields":{"message":"Connected to management server"},"target":"quilkin::net::xds::client","filename":"src/net/xds/client.rs"}

...
{"timestamp":"2024-05-01T08:31:00.064008Z","level":"WARN","fields":{"message":"lost connection to relay server, retrying"},"target":"quilkin::net::xds::client","filename":"src/net/xds/client.rs"}
{"timestamp":"2024-05-01T08:31:00.064038Z","level":"INFO","fields":{"message":"attempting to connect to `http://quilkin-relay-agones:7900/`"},"target":"quilkin::net::xds::client","filename":"src/net/xds/client.rs"}
{"timestamp":"2024-05-01T08:31:00.064979Z","level":"INFO","fields":{"message":"Connected to management server"},"target":"quilkin::net::xds::client","filename":"src/net/xds/client.rs"}

This sequence repeats every 30 seconds.
So far we looked at:

'debug' and 'trace' level logs for both agent and relay
tcpdump of traffic between agent and relay
some netstat/lsof/strace inspection in the agent container

Observations:

agent logs claim lost connection to relay every 30 seconds, immediately followed by a successful retry and reconnect
tcpdump shows a repeating pattern: a new TCP connection is established from agent to relay, some data is exchanged, 30 seconds later the agent initiates teardown by sending a FIN
debug logs also show the agent is sending (and relay is receiving) HTTP/2 GOAWAY every 30 seconds
The surrounding logs differ between each 30 second interval, there is no clear pattern leading up to or following the lost connection message

We tried looking for timers and found IDLE_REQUEST_INTERVAL, which defaults to 30 seconds. We changed this using --idle-request-interval-secs "60" to see if this influences the behaviour we see, and the "lost connection" issue vanished! The connection between agent and relay remained intact for as long as I watched it.
If we restore IDLE_REQUEST_INTERVAL to 30 seconds, the "lost connection" behaviour returns, so it seems at least right now we are able to reproduce this in our environment.
Is there any more information we could provide to help isolate the cause?

We were chatting about this on Discord (I think we settled on 30s and 25 seconds respectively), but to make sure we implement this right (and because my head hurts a little - so making sure I've got the right order), the solution should probably be:

On the relay make the default --idle-request-interval 30s
On the agent make the default --idle-request-interval 35s so it has a nicer buffer to wait.

And we should write some docs to ensure that if you want to tweak this value, make sure that you don't make the relay equal to or less than the agent idle.
Did I make sure to capture that correctly?

We were chatting about this on Discord (I think we settled on 30s and 25 seconds respectively), but to make sure we implement this right (and because my head hurts a little - so making sure I've got the right order), the solution should probably be:

On the relay make the default --idle-request-interval 30s
On the agent make the default --idle-request-interval 35s so it has a nicer buffer to wait.

And we should write some docs to ensure that if you want to tweak this value, make sure that you don't make the relay equal to or less than the agent idle.
Did I make sure to capture that correctly?

Yes, you did capture that correctly. The agent needs a small buffer so that it does not prematurely close the connection.
From our investigations 5 seconds is more than enough, but your milage may vary.
I also strongly agree with you there that having some docs would be great!

Thanks, after a bunch of troubleshooting last week we found the same thing: relay idle interval needs to be shorter than agent idle interval. We went with 30s on the agent and 25s on the relay in the end. This seems to be stable so far. +1 on the docs.

I think the simplest solution is to remove the idle interval on the agent, I don't think it's turned out to be intuitive, and the connection stability has been more improved since it was added.


Charts: Performing actions on the charts filter result in network errors

Setup

Rancher version: v2.8.7, v2.9.2, v2.10
Rancher UI Extensions:
Browser type & version: Chrome, Firefox

Describe the bug
Performing actions on the charts filter results in network errors.

deselecting 'All' results in error
selecting 'All' results in error
after getting an error, using the namespace filter causes the selected chart filters to change
in order to "select all", the user must select each filter option

Response:
{"type":"error","links":{},"code":"ServerError","message":"Operation cannot be fulfilled on preferences.management.cattle.io "hide-repos": the object has been modified; please apply your changes to the latest version and try again","status":500,"type":"error"}

To Reproduce

go to local cluster > apps > charts
select the Charts filter dropdown (repositories)
deselect 'All'
select 'All' (results in error)
deselect 'All' (results in error)
update select in the namespace filter in the header nav (the chart filter selection changes)

Result
Performing actions on the charts filter results in network errors.
Expected Result
Performing actions on the charts filter should not result in network errors.

Screenshots

https://github.com/user-attachments/assets/3ce2c50a-4879-44f7-95de-db15574ac368

Additional context

Whoever repros this, take a look to see if this actually points to a backend issue somehow based on the 500. However, upon discussion with @nwmac, this should be a 409.
@yonasberhe23 can you confirm this is a regression? This looks Vue3 at first but based on the prior versions, this may have been around a while.
Long term: we should re-evaluate our preferences mechanism since it's prone to conflicts during synchronization. Maybe this needs to go into the webworker.

Ah, 409 makes sense with that error message. Confirmed; I see it in v2.10, v2.9.2 and v2.8.7

OK, I'll push this out for now since this has been around for a while. 2.11 seems reasonable with a backport target to 2.10.x at least


Camera not working

After building and running there is no display from the camera.

May I know how to resolve the issue. Thanks,

@TerryGoh, you should test the app on a real device to get it working. https://github.com/Luca96/android-face-landmarks/issues/4


WASM.SIMD Comparison ops for 32x4 types

This PR includes

enable comparison operations + tests
binary arithmetic operations + tests
unary arithmetic operations + tests
flag fix to make sure we can pass around v128 within the same wasm module

@Cellule could you please take a quick look? I'm going to rebase wasm.simd after this change, since my remaining changes (int64x2, missing 32x4 ops) are still very prototypish :-) , so we might as well make a detour at this point and focus on separating simd.js from wasm.simd as you suggested earlier.

fyi @arunetm

:shipit:

@arunetm could you please try to merge this?

@MikeHolman @Cellule Guys, could you please help us to merge this one? Arun is still figuring out his perms issue.

@Cellule @MikeHolman very sorry to nudge you, guys, again about this PR. Could you please merge it when you have a moment?


feat: Display warning prompt when removing an approver from a control policy

Details

Display warning prompt when removing an approver from a control policy
Fixed Issues

$ https://github.com/Expensify/App/issues/43885
PROPOSAL: https://github.com/Expensify/App/issues/43885#issuecomment-2175387030
Tests

Precondition:

Create Control workspace in OldDot, make sure you can see it in NewDot
In OldDot, make sure the Control workspace has "Advanced Approvals" set up (on the workspace settings -> Members tab)
In OldDot, Add at least 2 other members (non-admin)
In OldDot, Set up 1 of the members (Member A) as the Approves To of the other member (Member B)

Go to the control WS created above
Open member page
Select user A and click on remove
Verify that the confirm modal appears with the warning prompt [Selected member] is an approver in this workspace. When you unshare this workspace with them, we’ll replace them in the approval workflow with the workspace owner, [Workspace Owner].
Open the member detail page of member A
Click on Remove from workspace button
Verify that the confirm modal appears with the same warning prompt in the step 4
Click on remove
Verify that the optimistic data and failure data are correct
Verify that the user is removed from the WS.

[x] Verify that no errors appear in the JS console

Offline tests

Same as above
QA Steps

Precondition:

Create Control workspace in OldDot, make sure you can see it in NewDot
In OldDot, make sure the Control workspace has "Advanced Approvals" set up (on the workspace settings -> Members tab)
In OldDot, Add at least 2 other members (non-admin)
In OldDot, Set up 1 of the members (Member A) as the submitsTo of the other member (Member B)

Go to the control WS created above
Open member page
Select user A and click on remove
Verify that the confirm modal appears with the warning prompt [Selected member] is an approver in this workspace. When you unshare this workspace with them, we’ll replace them in the approval workflow with the workspace owner, [Workspace Owner].
Open the member detail page of member A
Click on Remove from workspace button
Verify that the confirm modal appears with the same warning prompt in the step 4
Click on remove
Verify that the user is removed from the WS.

[x] Verify that no errors appear in the JS console

PR Author Checklist

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Screenshots/Videos

Android: Native
https://github.com/Expensify/App/assets/161821005/12f3f8b4-b17e-4643-8894-b0d721734cfa

Android: mWeb Chrome
https://github.com/Expensify/App/assets/161821005/e5bf6668-3e3b-48cd-afa4-6c038e983297

iOS: Native
https://github.com/Expensify/App/assets/161821005/3e2f441b-08ef-4cfb-a904-1ae650d5f42e

iOS: mWeb Safari
https://github.com/Expensify/App/assets/161821005/98b1b6e0-2769-4bd6-b74f-ec676df835dc

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/161821005/e90e1716-6978-43f0-962f-d0af7fb3247c

MacOS: Desktop
https://github.com/Expensify/App/assets/161821005/a26423f3-1dfe-48eb-b20f-c9e31a6f5d84

In OldDot, Set up 1 of the members (Member A) as the submitsTo of the other member (Member B)

@nkdengineer Please rephrase this to use the correct term displayed in OD (Approves To) to avoid confusion. Thanks.

Reviewer Checklist

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/4160319/e52f9d94-8ae7-4d5b-9b35-a9a92aae323d

MacOS: Desktop

@nkdengineer Please remember to fix the text in the test preconditions.

Updated.

@Beamanator I updated.

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

This PR is failing because of issue https://github.com/Expensify/App/issues/44631
https://github.com/Expensify/App/assets/78819774/343760f6-8f98-436e-bf90-be71b5c052e6
https://github.com/Expensify/App/assets/78819774/c4a69c39-3fe6-40ff-9fd5-c3254c127488

🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Fix UnityEditor hang up problem by stopping automatic compilation of scripts.

Environment

Unity 5.6.3p2 on Mac
Unity 5.6.3p2 on Windows

I noticed that there was no response from the UnityEditor application when editing the script file during play mode.
This script prevents UnityEditor from compiling during play mode.
UnityEditor no longer hangs up after implementing it.
I am not sure whether the script should be included in MagicOnion or not. I think it needs to be explained in README.md.
Thanks!

Debug.Log is slightly verbose,  could you remove it?
I would like to enrich the Editor Window a little more(for configuration, etc...)
However, it seems to be good to put it in now.

I removed Debug.Log
I am looking forward to the new EditorWindow !


examples in README fail

The method & function names changed.
AttributeError: 'NISTLines' object has no attribute 'get_energy_levels'

Can be fixed by get_energy_level_data
'O' example fails too, but different error :

Exception: ('NoASDlines', 'No ASD lines were found.')

I met the same problem, did you solve it?

Not the second one


Broken npm install?

When running npm install.. lots of error messages, problems with compilation..
  ../node_modules/nan/nan.h:672:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
 return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);

etc.
 gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:269:23)

etc.
Is this project still alive or obsolete & broken?   I have both "ancient" (0.x) and modern node.js (4.x) installed in my system.   The former has the excecutable "node" and the latter "nodejs"

bower                           ENOENT No bower.json present


RFM - Texts

https://chocolatey.org/packages/texts
Download: http://www.texts.io/Texts-1.5.msi

Ready to push, waiting to be added as maintainer as a previous version already exists.
https://github.com/chtof/chocolatey-packages/tree/master/automatic/texts

Under review: https://chocolatey.org/packages/texts

Package is published.


Implementing Swift's Error and Sendable protocols on an opaque Rust type's generated Swift class

The Problem
In #149 we implemented support for returning -> Result<T, E> where E is an opaque Rust type.
// Rust

#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        type TypeA;
        type TypeB;

        fn some_function() -> Result<TypeA, TypeB>;

        fn print_info(self: &TypeB);
    }
}

Swift errors need to conform to Swift's Error and Sendable protocols, but right now there is no way to
declare that an Opaque Rust type should conform to Error and Sendable.
Instead, you currently have to manually specify that a type conforms.
https://github.com/chinedufn/swift-bridge/blob/2ab37cbb949be4a466848129e7f17ecbb3fecf5e/SwiftRustIntegrationTestRunner/SwiftRustIntegrationTestRunner/Result.swift#L26-L27
An Example "Solution"

NOTE: This is a quick sketch of a potential solution in order to help make the problem more clear.
The concurrency implications have not been deeply considered.
Before working on this we should take a step back to lay out and consider all of the Rust + Swift concurrency factors at play. The final solution might not look anything like this sketch.
The "Resources" section below links to resources that we will want to study and reference while figuring out our design.

If an OpaqueRustType implements Rust's Send and Sync traits we may want the user to be able to emit a Sendable protocol implementation.
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        // If the type does not implement Rust's `Send + Sync` traits we get a
        // compile time error
        #[swift_bridge(Sendable)]
        type TypeA;
    }
}

// This implements `Send` and `Sync`, so
// the `Sendable` attribute above works.
struct TypeA {
    field: Vec<u8>
}

On the Swift side this could generate something like:
// Swift

extension TypeA: @unchecked Sendable {}
extension TypeA: Error {}

NOTE: The above is a quick sketch of a potential solution in order to help make the problem more clear.
The concurrency implications have not been deeply considered.
Before working on this we should take a step back to lay out and consider all of the Rust + Swift concurrency factors at play. The final solution might not look anything like this sketch.
The "Resources" section below links to resources that we will want to study and reference while figuring out our design.

Considerations
Sendable
We need to have a good understanding of Swift's Sendable protocol's requirements.
The Resources section below contains links with more information.
Swift reference types
The struct TypeA in Rust becomes a class TypeA in Swift.
If this class TypeA implements Sendable then it can be sent across threads,
meaning that two different threads could access the mutable methods on the instance of
class TypeA at the same time.
Is it possible for us to prevent this? Could Swift's Actors be of use here?
Concurrency
In general we need to think through Swift's concurrency model and make sure that we are going
down a safe path.
Getting some design feedback from someone with a good amount of Swift experience would be helpful.
Resources

Swift Sendable documentation

Sendable explained

Concurrency

Please add https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html to Resources.

First of all, how about supporting Swift's Error protocol when fields of Rust's struct consist of only primitive types?

Do you mean opaque Rust types or transparent shared structs?
Can you comment with a bridge module illustrating what you mean?

Do you mean opaque Rust types or transparent shared structs?

I meant opaque Rust types.

Can you comment with a bridge module illustrating what you mean?

#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        // If the type does not implement Rust's `Send + Sync` traits we get a
        // compile time error
        #[swift_bridge(Sendable)]
        type TypeA;
    }
}

// This implements `Send` and `Sync`, so
// the `Sendable` attribute above works.
struct TypeA {
    field: i32
}

//Swift

//...
extension TypeA: @unchecked Sendable {}
extension TypeA: Error {}

TypeA conforms to Sendable with @unchecked. But, this can obviously conforms to Sendable without it because this fields consists of only primitive types. So, this might be a good starting point.

Could Swift's Actors be of use here?

I don't think so. Swift's Actors is related to Swift's Task. Swift's Actor can be accessed by only one Swift's Task at a time. This prevents data-race. But, if we use Task, we need to think through what happens when calling Rust methods within Task. This will absolutely complicate swift-bridge.

If Opaque Rust Types have some methods with &mut self, we need to use Arc<Mutex<T>> or something like that, like so.

impl SomeType {
    fn some_method(&mut self) {
        self.0.lock().unwrap();
        //...
    }
}

Ok, I think I have a potential solution in mind.
Here are some thoughts:

Imagine the following bridge module:
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        type MySendSyncType;

        fn owned(self);
        fn ref(&self);
        fn ref_mut(&mut self);
    }
}

struct MySendSyncType {
    field: u32
}

Today, this generates the following Swift classes:
class MySendSyncType: MySendSyncTypeRefMut {
    // ...

    func owned() { /* */ }
}
class MySendSyncTypeRefMut: MySendSyncTypeRef {
    // ...

    func ref_mut() { /* */ }
}
class MySendSyncTypeRef {
    // ...

    func ref() { /* */ }
}

class MySendSyncType CANNOT be safely shared between Swift threads, since two threads could call .ref_mut() at the same time.
class MySendSyncTypeRef CAN be safely passed between Swift threads.
class MySendSyncTypeRefMut CANNOT be safely shared across Swift threads, since two threads could call .ref_mut() at the same time.

So, the requirements are:

Type is Send + Sync on the Rust side

Type has no mutable methods

So

MySendSyncType can be Swift Sendable if it has no mutable methods.

MySendSyncTypeRef can always be Swift Sendable.

MySendSyncTypeRefMut can always be Swift Sendable if it has no mutable methods.

One problem, though, is that the bridge macro can't know whether or not an opaque Rust type exposes mutable methods,
since its possible to split a types methods across multiple bridge modules.
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        type MySendSyncType;

        fn owned(self);
        fn ref(&self);
    }
}

#[swift_bridge::bridge]
mod ffi2 {
    extern "Rust" {
        #[swift_bridge(already_declared)]
        type MySendSyncType;

        fn ref_mut(&mut self);
    }
}

So, we know that MySendSyncTypeRef can be made Sendable, but users would then need to make sure that they remember not to try to use it
after the reference's lifetime.
In most cases you'll want a Sendable owned MySendSyncType.

So, the question becomes, how can we guarantee that a bridged Rust type does not have any mutable methods? Even if it has method declarations across multiple bridge modules?
Potential Solution 1 - Have swift-bridge-build keep track of information across multiple bridge modules
One approach would be to have swift-bridge-build look for types that are Sendable.
Right now swift-bridge-build iterates over all of your bridge files, parses the bridge modules, generated the Swift and C code and concatenates it all together into
a final Swift and C file.
https://github.com/chinedufn/swift-bridge/blob/23d60feaa0f8e92f2c854d8665868aa5573ef505/crates/swift-bridge-build/src/lib.rs#L16-L45
We could make this process instead first combine all of the bridge modules into one data structure and then generate the Swift and C code from that data structure.
In this way we could know whether or not we can make MySendSyncType and MySendSyncTypeRefMut Sendable, since we know whether or not it has any mutable methods.
 You'll only get the error when you try to use swift-bridge-build.

... think through other downsides ...

Potential Solution 2 - Don't allow mutable methods on Sendable opaque Rust types
We could have something like:
// In swift_bridge/src/std_bridge/sendable.rs

trait SwiftSendable {}
trait NotSwiftSendable {}

fn assert_sendable<T: SwiftSendable>() {}
fn assert_not_sendable<T: NotSwiftSendable>() {}

Then for the following bridge module:
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        #[swift_bridge(Sendable)]
        type MySendSyncType;

        fn owned(self);
        fn ref(&self);
    }
}

We would emit:
mod ffi {
    // ...
    impl swift_bridge::sendable::SwiftSendable for super::MySendSyncType {}
}

And if a module uses already_declared
#[swift_bridge::bridge]
mod ffi2 {
    extern "Rust" {
        #[swift_bridge(already_declared)]
        type MySendSyncType;

        #[swift_bridge(already_declared, Sendable)]
        type AnotherSendSyncType;

        fn ref_mut(&mut self);
    }
}

It emits something like:
mod ffi2 {
    // ...

    swift_bridge::sendable::assert_sendable<super::AnotherSendSyncType>();
    swift_bridge::sendable::assert_not_sendable<super::MySendSyncType>();
}

This way we know for sure that Sendable was used across all all extern Rust type MySendSyncType declarations.
So, from there if we see any mutable methods on a Sendable type we would return an error.
Downsides

You lose the ability to have MySendSyncTypeRef still be Sendable when MySendSyncType and MySendSyncTypeRefMut cannot be Sendable.

This doesn't sound useful to me in practice.

Conclusion
These are some quick thoughts that I just wrote down and haven't thought through too deeply.
Wanted to share them for discussion.
Right now I'm leaning towards Potential Solution 2 - Don't allow mutable methods on Sendable opaque Rust types.
I like that it forces all bridge modules to explicitly declare already_declared types as Sendable, so that if you're reading any bridge module you know whether or not the type is Sendable.

Thoughts?

I'll read it this weekend!!

By the way, right now we can use multithreading  on both Swift and Rust without this feature.
So, I have a question about:
isOwned is thread safe? Does swift-bridge prevent data-race?
https://github.com/chinedufn/swift-bridge/blob/b654a24d6d5169e0e73192ebffa556cd43044512/crates/swift-bridge-build/src/generate_core/rust_string.swift#L2

Hmm, that's a good question.
isOwned gets modified when

(case 1) the deinit method on a class OpaqueRustType instance is called.
(case 2) you pass on owned class OpaqueRustType from Swift -> Rust.

(case 1): If Swift calls deinit then there is exactly one instance remaining, so there can't be a data race there.

(case 2): After passing a class OpaqueRustType from Swift to Rust, any further usage on the Swift side is undefined behavior.
Two threads could both have an instance of OpaqueRustType and both try to pass ownership to Rust at the same time.
This is a problem.
Idea 1 - No passing ownership of Sendable Rust types from Swift -> Rust
One idea for how we might for this would be to make it impossible by not letting you pass owned Sendable Rust types from Swift -> Rust.
So, for example:
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        #[swift_bridge(Sendable)]
        type OpaqueRustType;

        // Compile time error since Swift isn't allowed to pass ownership back to Rust.
        fn take(self);

        // Compile time error since Swift isn't allowed to pass ownership back to Rust.
        fn eat(ty: OpaqueRustType);

        // This is fine since
        fn by_ref(reference: &OpaqueRustType);
    }
}

But, that isn't a great solution since you could still call .take() from one thread and .by_ref() from another thread which would be an issue.
Idea 2 - Use synchronization for the isOwned if the type is Sendable
for a #[swift_bridge(Sendable)] opaque Rust type we could consider putting the isOwned Bools access behind some sort of Swift synchronization primitive.
Then we could have an optional check in every generated class method of an owned class instance that confirms that isOwned is true. If it's false, it panics.
class OpaqueRustType {
    var isOwned: SomeSynchronizedBool

    func take() {
        if !isOwned { fatalError() }

        // ...
    }

    func eat() {
        if !isOwned { fatalError() }

        // ...
    }

    // ...
}

Something like this might also be useful for non Sendable types since it would turn use after frees into defined behavior (fatal error).
I've had this check idea in the past, but I don't like that it adds overhead to every call. At the very least we might want to always enable something like this in debug builds.
Then figure out whether it should be on or off by default in release builds.
Idea 3 - Do nothing
One option is to just allow this to be a problem that the user must manage and document it (unless there's some Swift feature that lets us solve this problem without trade-offs).
For example, this is related to the the Never use a value after its dropped safety rule in our book https://github.com/chinedufn/swift-bridge/blob/637c7b353539c1122dacc3a64e7d5dc052a4fec9/book/src/safety/README.md?plain=1#L122-L148 .
Conclusion
I haven't used swift-bridge in a multi threaded context so I don't have a good sense of the trade-offs on how we might go about handling thread safety.
So, I'm starting by just sharing the ideas above.

I've had this check idea in the past, but I don't like that it adds overhead to every call.

If an a class Opaque Rust Type is Sendable, what about releasing its resoureces not on the Rust side but only on the Swift side? This means that its resources get released from only deinit.
So, we can remove isOwned from a class Opaque Rust Type that conforms that Sendable, like so:
class OpaqueRustType {
   //var isOwned: Bool
}

This advantage.     : we don't need think whether or not isOwned is thread-safe, and there is no overhead.
This disadvantage : we can't have owned methods if a class Opaque Rust Type is Sendable.

I haven't used swift-bridge in a multi threaded context so I don't have a good sense of the trade-offs on how we might go about handling thread safety.

Me either! But, if swift-bridgesupports Sendable, we need to think through handling isOwned, and then I guess that we could finally start to discuss supporting Sendable.

I'm imagining that the compile time error on functions that pass ownership from Swift -> Rust such as:

Sounds good to me!!

Long term I like Idea 2 - Use synchronization for the isOwned if the type is Sendable since it would give the developer the ability to safely transfer ownership from Swift -> Rust, but as a starting point I think that only freeing from deinit is great since I'm not sure that needing to pass ownership back to Rust is all that common.

I think so too. We can finally start to discuss supporting Sendable based on Idea 2.

Hi @chinedufn.
Based on the previous discussion,
To make a OpaqueRustType that conforms to Sendable:

Needs to conform to Sync+Send on the Rust side.
To release its resources from only Swift deinit, it has only immutable methods.

Something like:

#[swift_bridge]
mod ffi {
   extern "Rust" {
      type SomeType;
      fn immutable_method(&self)//We only have immutable methods.
   }
}

This should generates:
class SomeType {
    //var isOwned: Bool = true //this get deleted.

    public override init(ptr: UnsafeMutableRawPointer) {
        super.init(ptr: ptr)
    }

    deinit {
        //Since we don't need to have the isOwned, so we could delete the if statement.
        //if isOwned {
            __swift_bridge__$SomeType$_free(ptr)
        //}
    }
}

How about this?

Handling type declaration across multiple bridge modules

Even if it has method declarations across multiple bridge modules?

I agree with "Potential Solution 2 - Don't allow mutable methods on Sendable opaque Rust types".
You said :

This doesn't sound useful to me in practice. Having the Ref be Sendable but not the owned type would cause confusion.

Since we couldn't have owned methods, we don't need to care about this.

By the way, I guess that a Sendable OpaqueRustType couldn't have mutable arguments and owned methods, like so:

#[swift_bridge]
mod ffi {
   extern "Rust" {
      type SomeType2;
   }
   extern "Rust" {
      #[swift_bridge(Sendable)]
      type SomeType;
      fn immutable_method(&self, some_value: &mut i32, some_type2: SomeType2)//compile error
   }
}

This is a problem...

How about this?

Sounds about right to me!

If we adopt the idea immediately above, we don't need to care about this since we couldn't have owned methods

Agreed

By the way, I guess that a Sendable OpaqueRustType couldn't have mutable arguments and owned arguments, like so:

I don't think that this would be a problem.
Say you're in thread A.  Rust can't pass SomeType2 to another thread unless it's thread safe.
If it isn't thread safe Rust won't let you.
So, Sendable OpaqueRustType methods CAN have mutable arguments and owned arguments.

Thanks for exploring all of this!

I don't think that this would be a problem.

Let's say that we have two Tasks  and have two OpaqueRustTypes on the Swift side, like so:
let opaqueRustType1 = OpaqueRustType1()
let opaqueRustType2 = OpaqueRustType2()

//Task1
Task {
   opaqueRustType1.immutableMethod(opaqueRustType2)
}

//Task2
Task {
   opaqueRustType1.immutableMethod(opaqueRustType2)
}

I guess that the above code snippet might not be thread-safe.

Sorry I'm not very familiar with Swift Tasks.
If all of that code is running on the same thread then it looks thread safe to me.
Why wouldn't this be thread safe?
Can you move a Task to a different thread if it captures non Sendable values?

Can you move a Task to a different thread if it captures non Sendable values?

Yes. But, Swift6 should generate any compile errors when a Task captures non Sendable values. Right now Swift version should be 5.8.

@chinedufn
This issue should be separated into multiple tasks:

[ ]  Supports Sendable for OpaqueRustType
[ ]  Supports Sendable for OpaqueRustType across multiple bridge modules

I'd like to work on the first task.

Sounds good!

For Rust opaque types that implement std::error::Error, it would be nice to be able to automatically generate a Swift Error extension using the type's Display implementation. All that would be needed is for the type to have the #[swift_bridge(Error)] attribute, then a function would be generated to call the type's to_string function, which the generated Swift extension would use for localizedDescription.
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        #[swift_bridge(Error)] // Causes FFI function to be generated for `self.to_string()` and something like `extension SomeError: Error { var localizedDescription: String { swift_bridge_SomeError_internal_to_string(self) }`
        type SomeError;
    }
}

#[derive(thiserror::Error)]
pub enum SomeError {
    #[error("Error message")]
    Error,
}

It might be nice to allow this attribute on normal functions:
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        type SomeError;
        #[swift_bridge(Error)]
        fn display(&self) -> String; // Allows the user to customize the string used for localizedDescription, for example using the Debug implementation instead (this could just be an option on the attribute)
    }
}

If this seems like a good solution I may be able to implement it. (not sure about the Sendable stuff; I've been hand writing Error extensions for Rust types and never had any issues)

A Swift Error must implement Sendable, so I'm not sure that we would want #[swift_bridge(Error)] support without nailing down our send/sync story.
It looks like the localizedDescription is available on Swift Errors that implement the Swift LocalizedError protocol
https://stackoverflow.com/a/39176551
https://developer.apple.com/documentation/foundation/localizederror
So, maybe we could have a #[swift_bridge(LocalizedError)] attribute that generates a LocalizedError protocol implementation?
#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        #[swift_bridge(LocalizedError)]
        type SomeError;

        fn error_description(&self) -> String;
    }
}

If a opaque type implements Error, the opaque type don't have owned methods.

It looks like the localizedDescription is available on Swift Errors that implement the Swift LocalizedError protocol

Normal Errors also seem to have this property: https://developer.apple.com/documentation/swift/error/localizeddescription


{network} remove preview tag for --key-vault-secret-id

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

network


A delay before generate snapshot by phantomjs

I configured my app like this:
input: "array",       source: sitemap,       outputDir: "./snapshots",       outputDirClean: true,       selector: {         "__default": "body"       },         timeout: {         "__default": 10000       }
And my app is using Angularjs 1.5. The problem is in some pages, after the page loaded completely, There is another XHR request that will give info from db. I need a small delay before generating snapshot to let the app finish the XHR request. How can I do that?

Does the XHR request result in a change to the html?

Haven't heard back from you in 10 days, so I'm closing. Feel free to reopen if you want help.


MVC integration - endpoint matching

[ ] Update abstractions
[ ] Invoke MVC action via conventional route
[ ] Invoke MVC action via attribute route

@rynowak How do you imagine conventional routing will work?
Off the top of my head it would be a helper method inside MVC, called at startup like MapRoute/MapAreaRoute, that a dispatcher data source then uses to resolve the matched template's route values to an action using the equivilent of ActionSelector.SelectCandidates, and then filter to a final result using SelectBestCandidate.
Warm/cold? Worth discussing in a call?

Yes, that sounds about right. You might be able to reuse a lot of that code. Feel free to setup a call if there's more you want to discuss or confirm, but that's what I had in mind.

It's almost like what I know what I'm doing 🍰

Finished with https://github.com/aspnet/Mvc/pull/7928
Will open individual issues for additional fixes/features/work


Cleanup builder payload attributes

📝 Summary

⛱ Motivation and Context

We are moving to SSE based subscriptions instead of using a custom build trigger using our Prysm fork. Therefore we are removing all code related to the custom call and related sync logic.
📚 References

✅ I have run these commands

[x] make lint
[x] make test-race
[x] go mod tidy
[x] I have seen and agree to CONTRIBUTING.md

Codecov Report

Merging #8 (5a78555) into main (9d5dfef) will increase coverage by 0.88%.
The diff coverage is 75.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
+ Coverage   67.34%   68.22%   +0.88%
==========================================
  Files           5        5
  Lines         542      513      -29
==========================================
- Hits          365      350      -15
+ Misses        149      138      -11
+ Partials       28       25       -3

Flag
Coverage Δ

unittests
68.22% <75.00%> (+0.88%)
:arrow_up:

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

Impacted Files
Coverage Δ

utils.go
77.77% <ø> (-1.33%)
:arrow_down:

types.go
67.39% <25.00%> (+6.28%)
:arrow_up:

proxy.go
79.42% <100.00%> (+1.53%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


I93 94 remove old locations

closes #93 and closes #94 , reverts temporary code from #95

Thanks very much Joe, this should be just what we need. Please go ahead and merge.

Awesome. Thanks for resolving!


无法拉取docker镜像

Describe the bug
A clear and concise description of what the bug is.
无法拉取镜像
To Reproduce
To help us to reproduce this bug, please provide information below:

Your Python version.
The version of xinference you use.
Versions of crucial packages.
Full stack of the error.
Minimized code to reproduce the error.

Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.

国内镜像封了，翻出去拉吧


Try to read ikfast moveit adapter parameters from group namespace

This adjusts the parameter reading in IkFastMoveitStateAdapter to try to read its parameters from a private-ish namespace first.
The rationale behind this is that this class may be instantiated multiple times inside a given node, each time for a different group and using a different IkFast plugin, and therefore needing different settings for the base/tool frame configuration.
The existing code would use either the value configured in a parameter (e.g. NODE_NAMESPACE/ikfast_base_frame), or a default otherwise. But it was not possible to set different values for different instances of the class. The new logic will perform a upwards lookup for the parameter starting in a nested namespace with the name of the relevant group (e.g. NODE_NAMESPACE/GROUP_NAME/ikfast_base_frame).

Travis jobs are failing for unrelated problems. I'd prefer to avoid fixing the tests for this PR to be merged... :sweat:


Fix cargo vendor for anki (csv-core: change version to 0.0.99)

cargo vendor on anki currently fails as follow:
error: failed to sync

Caused by:
  found duplicate version of package `csv-core v0.1.10` vendored from two sources:

        source 1: registry `crates-io`
        source 2: https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90#1c9d3aab

Because csv-core is included twice in the dependency tree:
├── csv v1.1.6 (https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90#1c9d3aab)
│   ├── csv-core v0.1.10 (https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90#1c9d3aab)
├── fsrs-optimizer v0.1.0 (https://github.com/open-spaced-repetition/fsrs-optimizer-rs?rev=e0b15cce555a94de6fdaa4bf1e096d19704a397d#e0b15cce)
│   ├── burn v0.9.0 (https://github.com/burn-rs/burn.git?rev=36446e8d35694a9158f97e85e44b84544b8c4afb#36446e8d)
│   │   ├── burn-core v0.9.0 (https://github.com/burn-rs/burn.git?rev=36446e8d35694a9158f97e85e44b84544b8c4afb#36446e8d)
│   │   │   ├── burn-dataset v0.9.0 (https://github.com/burn-rs/burn.git?rev=36446e8d35694a9158f97e85e44b84544b8c4afb#36446e8d)
│   │   │   │   ├── csv v1.2.2
│   │   │   │   │   ├── csv-core v0.1.10

Until something similar to commit 1c9d3aab6f79 ("Automatically escape
fields that contain the comment character") makes it in an upstream
release, take the easy way out and just make sure the versions don't
conflict for cargo vendor.
(I've got a patch for upstream as well that'll just allow adding arbitrary characters to requires_quotes for an eventual v0.1.11 or v0.2, but would like to get anki to build on nixos first -- since nixos requires bundling cargo dependencies with something akin to cargo vendor this is a hard requirement for us.
I've confirmed anki builds with the following patch on top of 23.10beta1
diff --git a/Cargo.lock b/Cargo.lock
index d4369100bee4..c4d849beda5c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1094,10 +1094,10 @@ dependencies = [
 [[package]]
 name = "csv"
 version = "1.1.6"
-source = "git+https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90#1c9d3aab6f79a7d815c69f925a46a4590c115f90"
+source = "git+https://github.com/ankitects/rust-csv.git?rev=74721cd1e0f6d1b4dca4967d606fef0148a94d53#74721cd1e0f6d1b4dca4967d606fef0148a94d53"
 dependencies = [
  "bstr 0.2.17",
- "csv-core 0.1.10 (git+https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90)",
+ "csv-core 0.0.99",
  "itoa",
  "ryu",
  "serde",
@@ -1109,7 +1109,7 @@ version = "1.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086"
 dependencies = [
- "csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "csv-core 0.1.10",
  "itoa",
  "ryu",
  "serde",
@@ -1117,9 +1117,8 @@ dependencies = [

 [[package]]
 name = "csv-core"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
+version = "0.0.99"
+source = "git+https://github.com/ankitects/rust-csv.git?rev=74721cd1e0f6d1b4dca4967d606fef0148a94d53#74721cd1e0f6d1b4dca4967d606fef0148a94d53"
 dependencies = [
  "memchr",
 ]
@@ -1127,7 +1126,8 @@ dependencies = [
 [[package]]
 name = "csv-core"
 version = "0.1.10"
-source = "git+https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90#1c9d3aab6f79a7d815c69f925a46a4590c115f90"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
 dependencies = [
  "memchr",
 ]
diff --git a/Cargo.toml b/Cargo.toml
index 96a3eb83988c..97503158543a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,7 +28,7 @@ resolver = "2"

 [workspace.dependencies.csv]
 git = "https://github.com/ankitects/rust-csv.git"
-rev = "1c9d3aab6f79a7d815c69f925a46a4590c115f90"
+rev = "74721cd1e0f6d1b4dca4967d606fef0148a94d53"

 [workspace.dependencies.percent-encoding-iri]
 git = "https://github.com/ankitects/rust-url.git"

Thanks!

This repo wasn't set up to notify me for some reason, so I only noticed this PR by chance when browsing recent forks.
Is this necessary? Can you perhaps accomplish the same thing by adding a 'patch' line in Cargo.toml instead?
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html

Oh, thanks for noticing!

Is this necessary? Can you perhaps accomplish the same thing by adding a 'patch' line in Cargo.toml instead?

Hmm, I'm not familiar with rust all that much, but from what I see of the link you gave patch is for overriding direct dependences, so it doesn't use crates.io but a git url e.g. just like what you're already doing with workspace.dependencies.csv in anki's Cargo.toml
In particular:

it seems to just replace a whole tree, so I don't see how I could tell it that "trust me this csv-core-0.1.10 crate isn't the same as this other csv-core 0.1.10"
i'm pretty sure it'd work if we could tell rust that burn-dataset depends on anki's csv (hopefully they're not using the v1.2 API -- if they were a rebase might be needed, or overriding that csv 1.2.2's csv-core should work); but I don't see how to do that either.

Long term anyway I really think it's best to just have rust-csv allow adding arbitrary escape characters; I'm honestly not sure I understand why anki requires that (we're writing the CSVs with rust-csv, but reading them from another lib that ignores lines starting with #? rust-csv itself shouldn't ignore these afaict); but it'd never make it for the 23.10 release so this is really just a stop-gap for this release until I have time to discuss this upstream.
Assuming you agree with this, I don't think it's worth spending too long perfecting this, but if you have something particular in mind that I missed I'll be happy to change anything.

IIRC, patch will apply to transitive dependencies as well.

Long term anyway I really think it's best to just have rust-csv allow adding arbitrary escape characters

You seem to misunderstand the problem. Exported files can't be imported back correctly into rust-csv. Please see https://github.com/BurntSushi/rust-csv/pull/283

IIRC, patch will apply to transitive dependencies as well.

I'm not sure how that'd help here, unless you want to create a fork of burn-dataset to patch their Cargo.toml, and use that in a patch of anki's Cargo.toml? I'm pretty sure that's not what you meant, but I just don't see how patch could end up being simpler what we have here.

You seem to misunderstand the problem. Exported files can't be imported back correctly into rust-csv. Please see https://github.com/BurntSushi/rust-csv/pull/283

I've seen your commit; I couldn't reproduce when I tried last week but I had missed that the reader interface has a comment() method to ReaderBuilder, I guess it makes more sense to me now (although I still think the writer shouldn't really care about 'comments' and would be simpler to just expose the list of quoted chars -- I can see how uniformizing the interface is nice to use and don't really care either way)
That doesn't really change my point: the plan is to make upstream's rust-csv into something anki can use, this patch is just meant to be used until then.
You've made a fork of rust-csv which changed something in csv-core, so it should be reflected to the version there (regardless of the cargo vendor problem).
It's technically API compatible so 1.2.0 would be ok, but 1.2.0 might be used by upstream at some point so I went the other way; I don't think it really matters here.

The whole idea of patch is that the compiled-crate can override dependencies in its dependencies, so I don't see why a patch to burn-rs would be required. If this doesn't work in nix, it sounds more like a nix problem.

Nix just does what it's told. If cargo vendor works there should be no problem.
Ok, so I didn't understand how patch works as I had never seen it being used before, and wanted to make rust recognize the versions are different, but if the point is to make burn-rs use our csv-core this works:
diff --git a/Cargo.toml b/Cargo.toml
index 96a3eb83988c..9b30e7d4f203 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,6 +43,10 @@ git = "https://github.com/open-spaced-repetition/fsrs-rs.git"
 rev = "fefe01fca179f930fc2b837db85fe63cf0cb75f3"
 # path = "../../../fsrs-rs"

+[patch.crates-io.csv-core]
+git = "https://github.com/ankitects/rust-csv.git"
+rev = "1c9d3aab6f79a7d815c69f925a46a4590c115f90"
+
 [workspace.dependencies]
 # local
 anki = { path = "rslib" }
diff --git a/Cargo.lock b/Cargo.lock
index d4369100bee4..2c8f9034c45d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1097,7 +1097,7 @@ version = "1.1.6"
 source = "git+https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90#1c9d3aab6f79a7d815c69f925a46a4590c115f90"
 dependencies = [
  "bstr 0.2.17",
- "csv-core 0.1.10 (git+https://github.com/ankitects/rust-csv.git?rev=1c9d3aab6f79a7d815c69f925a46a4590c115f90)",
+ "csv-core",
  "itoa",
  "ryu",
  "serde",
@@ -1109,21 +1109,12 @@ version = "1.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086"
 dependencies = [
- "csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "csv-core",
  "itoa",
  "ryu",
  "serde",
 ]

-[[package]]
-name = "csv-core"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
-dependencies = [
- "memchr",
-]
-
 [[package]]
 name = "csv-core"
 version = "0.1.10"

With that cargo vendor works and build should work as well because you didn't break anything major in csv-core; but it's still weird to me to make burn-rs use our version here.
If (that's a big if) rust-csv updates csv-core, and burn-rs makes use of the new APIs that'll stop working, so it doesn't change anything in that it's a temporary stop gap at best.
This patch is immune to rust-csv changes, so I'd tend to prefer it, but it's your call and I can open a PR on anki with the above patch if you'd like (or you can just do it if you prefer, I don't care about having my name on it)

As far as I'm aware, the patch will only be applied to crates using a semver-compatible version.
In any case, there's finally been some movement on the PR, so this will hopefully not be required for too long.

upstream released a new csv version with your PR, so opened something in anki to use it:
https://github.com/ankitects/anki/pull/2703
Closing this.


[BUG] Crash on start-up suddenly happening despite no change to code

Library Version
5.13.2
Describe the Bug
In the last 2 days or so, I have not been able to run my bot as it immediately crashes on start-up despite no change to the code in several weeks. The error appears to be within the library's user.py file, as shown in the traceback below.
Steps to Reproduce
This error occurs every time I attempt to run my bot.
Expected Results
I would expect my bot to run as normal.
Minimal Reproducible Code
No response
Traceback
Traceback (most recent call last):
  File "/home/container/main.py", line 273, in <module>
    bot.start("Hidden token")
  File "/home/container/.local/lib/python3.10/site-packages/interactions/client/client.py", line 1008, in start
    asyncio.run(self.astart(token))
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/container/.local/lib/python3.10/site-packages/interactions/client/client.py", line 964, in astart
    await self.login(token)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/client/client.py", line 946, in login
    self._user = ClientUser.from_dict(me, self)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/models/discord/base.py", line 36, in from_dict
    data = cls._process_dict(data, client)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/models/discord/user.py", line 170, in _process_dict
    data = super()._process_dict(data, client)
  File "/home/container/.local/lib/python3.10/site-packages/interactions/models/discord/user.py", line 64, in _process_dict
    if not isinstance(data["avatar"], Asset):
TypeError: 'NoneType' object is not subscriptable
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f962c7a90f0>

Checklist

[X] I have searched the open issues for duplicates.
[X] I have shown the entire traceback, if possible.
[X] I have removed my token from display, if visible.
[X] I have attempted to debug this myself, and I believe this issue is with the library

Additional Information
No response

This seemingly implies that the /user/@me endpoint was returning nothing, which is... strange. I certainly can't reproduce it. If anyone else has this issue, please do respond.

This seemingly implies that the /user/@me endpoint was returning nothing, which is... strange. I certainly can't reproduce it. If anyone else has this issue, please do respond.

I believe you are correct, as above the traceback (I should perhaps have included it) is the following:
GET /users/@me Has exceeded its ratelimit (1)! Reset in 0.0 seconds
GET /users/@me Has exceeded its ratelimit (1)! Reset in 0.0 seconds
GET /users/@me Has exceeded its ratelimit (1)! Reset in 0.0 seconds


problem opening taxonomy file from Silva

Hi @jbisanz
qza_to_phyloseq and read_qza do not manage to open correctly my silva taxonomy file. I got a warning message (see attached). It creates the phyloseq object but the taxonomy has 8335 rows (= ASVs) instead of 34550. I converted my qza file to tsv file and checked that it contains effectively 34550 ASVs.
I think it is because there is a unusual character in row 8335. Basically the taxonomy is "D_6__[Clostridium] piliforme (Tyzzer's bacillus)". I wonder if it is because the functions can not handle the ' ?
Could you advise on what I can do? I am happy to send you my qza file but I do not manage with this platform.
Many thanks for your help.
A.

All fixed!


add cp method

wondering; Does this need adding, if it can already be done from Lua?
as for the implementation, it reads and writes the entire file at once. This could be dangerous depending on file size.


Fixed missing pass of authorized prop from native Page to Match

Prop authorized in native component Page was not passed to Match so it was not redirecting to signIn

Thank you very much. I have to rebuild whole Este React Native integration and with https://github.com/react-community/react-navigation.

Sorry, but it will be rework.


fixed incorrect page size calculation

Using Math.ceil ensures that you don't ignore any products.
Math.round or parseInt behaviour: 160/3 -> 3 while actually there are 4 pages.

Thanks!


navigationDelegate android webview not working

i am using webview_flutter: ^2.0.3 on my app.
When i use method "navigationDelegate" to check url contain something. Its work on IOS, but not on android.
WebView(                               initialUrl: url,                               javascriptMode: JavascriptMode.unrestricted,                               gestureNavigationEnabled: true,                               onWebViewCreated:                                   (WebViewController webViewController) {                                 _controller = webViewController;                                 if (url != null) {                                   _controller.loadUrl(url);                                 }                               },                               onProgress: (int progress) {                                 print(                                     "WebView is loading (progress : $progress%)");                               },                               javascriptChannels: <JavascriptChannel>{},                               navigationDelegate:                                   (NavigationRequest request) {                                 if (request.url == null) {                                   print('blocking navigation to $request');                                   return NavigationDecision.prevent;                                 }                                 if (request.url.contains('success')) {                                   print('payment complete');                                   Get.toNamed('/purchase_result', arguments: true);                                 }                                 if (request.url.contains('failure') || request.url.contains('incomplete')) {                                   print('payment complete');                                   Get.toNamed('/purchase_result', arguments: false);                                 }                                 print('allowing navigation to $request');                                 return NavigationDecision.navigate;                               },                               onPageStarted: (String url) {                                 print('Page started loading: $url');                               },                               onPageFinished: (_) {                                 controller.readJS(_controller);                               },                             )
[✓] Flutter (Channel stable, 2.0.3, on Mac OS X 10.15 19A583 darwin-x64, locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Xcode - develop for iOS and macOS
! Xcode 11.2.1 out of date (12.0.1 is recommended).
Download the latest version or update via the Mac App Store.
! CocoaPods 1.9.2 out of date (1.10.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] Connected device (2 available)
! Doctor found issues in 1 category.

Its working fine for me

Hi @hungnv1709
I see there's an open issue addressing the case you described.
Please follow up on that issue, Closing as duplicate of https://github.com/flutter/flutter/issues/39441
If you disagree, please write in the comments and I will reopen it.
Thank you


get_cert with TXT not working

Requires rework on the openssl CLI modules as "openssl x509 -text" sends the output for the text section to stdout even if -out option is provided.

The tools to read the result from STDOUT instead of a temp file seem to be there already, but I failed to solve this.
Affected code: OpenXPKI::Crypto::Backend::OpenSSL::Command::convert_cert->get_command().
If OUT = 'TXT' this return value should work but doesn't:
return {
  COMMAND => 'x509 ...',
  PARAMS => [ { TYPE => 'STDOUT' } ]
};

Error:
'__COMMAND__' => 'OpenXPKI::Crypto::Backend::OpenSSL::Command::convert_cert',
'__ERRVAL__' => 'I18N_OPENXPKI_READ_FILE_DOES_NOT_EXIST; __FILENAME__ => /var/tmp/openxpki13634Ix9zLT0R'

Background:
OpenXPKI::Crypto::Toolkit->command() also accepts a HashRef from get_command() like { COMMAND => ..., PARAMS => ....
The syntax for the PARAMS part is specified in OpenXPKI::Crypto::CLI->execute().


RabbitMQ delete queue after create it

Hi
We used RabbitMq for queuing SMS services. We created queues in RabbitMQ with the following statements:
$mobiles = explode(",",$SendRequest['receiver_number']);
$connection = new AMQPConnection($Configuration['rabbitmq']['host'], $Configuration['rabbitmq']['port'], $Configuration['rabbitmq']['username'], $Configuration['rabbitmq']['password']);
$queueName = 'ontime_'.$recordID;
$channel = $connection->channel();
$channel->queue_declare($queueName, false, true, false, false);
//start a loop here
foreach($mobiles as $mobile) {
//Do some statements
//.
//.
//.
$msg = new AMQPMessage((float)$mobile."|".($MessageAmount)."|".$tariff_stat,array('delivery_mode' => 2));
$channel->basic_publish($msg, '', $queueName);
}
// end loop
$channel->close();
$connection->close();
In this situation, our queue is deleted sometimes! We add a sleep(5) before closing channel & connection to resolve this issue, but this is not a reliable solution.
Your help is highly appreciated,
Thanks in advance

Please post questions to rabbitmq-users or Stack Overflow. RabbitMQ uses GitHub issues for specific actionable items engineers can work on, not questions. Thank you.